diff options
Diffstat (limited to 'scripts/xdt-autogen.in')
-rw-r--r-- | scripts/xdt-autogen.in | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/scripts/xdt-autogen.in b/scripts/xdt-autogen.in index 71b55ae..b614fe0 100644 --- a/scripts/xdt-autogen.in +++ b/scripts/xdt-autogen.in @@ -39,6 +39,47 @@ fi ## +## Check for a suitable make +## +if test x"${MAKE}" = x""; then + if (type gmake) >/dev/null 2>/dev/null; then + MAKE="gmake" + elif (type make) >/dev/null 2>/dev/null; then + MAKE="make" + else + cat >&2 <<EOF +xdt-autogen: You must have "make" installed on your system. +EOF + exit 1 + fi + export MAKE +fi + + +## +## cleanup autogenerated files +## +if test x"$1" = x"clean"; then + echo "Running ${MAKE} distclean..." + (cd ${SOURCE_DIR} ; + ${MAKE} distclean) >/dev/null 2>&1 + + echo "Cleaning generated files..." + (cd ${SOURCE_DIR} ; + rm -f config.* configure configure.lineno aclocal.m4 ; + rm -f compile depcomp ltmain.sh missing install-sh ; + rm -f po/*.gmo po/Makefile.in.in ; + rm -f stamp-h1 *.spec ; + rm -f mkinstalldirs libtool ; + rm -rf autom4te.cache ; + rm -f intltool-*) + rm -f `find ${SOURCE_DIR} -name Makefile.in` + + exit 0 +fi + + +## ## Check for autoconf ## test -z "${XDT_PROG_AUTOCONF}" && XDT_PROG_AUTOCONF="autoconf" @@ -53,6 +94,22 @@ EOF ## +## Check for intltoolize +## +test -z "${XDT_PROG_INTLTOOLIZE}" && XDT_PROG_INTLTOOLIZE="intltoolize" +if grep "^AC_PROG_INTLTOOL" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (${XDT_PROG_INTLTOOLIZE} --version) </dev/null >/dev/null 2>&1 || { + cat >&2 <<EOF +xdt-autogen: You must have "intltool" installed on your system. + You can download the source tarball from + ftp://ftp.gnome.org/pub/GNOME/. +EOF + exit 1 + } +fi + + +## ## Check for libtoolize ## test -z "${XDT_PROG_LIBTOOLIZE}" && XDT_PROG_LIBTOOLIZE="libtoolize" @@ -180,6 +237,11 @@ if test -d "${SOURCE_DIR}/po"; then fi fi +if grep "^AC_PROG_INTLTOOL" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (echo "Running ${XDT_PROG_INTLTOOLIZE} --automake --copy --force" && + ${XDT_PROG_INTLTOOLIZE} --automake --copy --force) || exit 1 +fi + if grep "^AC_PROG_LIBTOOL" "${CONFIGURE_FILE}" >/dev/null 2>&1; then (echo "Running ${XDT_PROG_LIBTOOLIZE} --force --copy..." && ${XDT_PROG_LIBTOOLIZE} --force --copy) || exit 1 |