From c4813e68e4075e9c471cc0acf94ce1ec4f50d43c Mon Sep 17 00:00:00 2001 From: wdlkmpx Date: Mon, 24 Aug 2020 19:27:20 +0800 Subject: [PATCH] update autogen.sh --- .gitignore | 1 + autogen.sh | 34 +++++++++++++++++++++++++++------- configure.ac | 7 ++++--- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index d7abc28..01f85f8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ compile config.guess config.h* config.log +config.rpath config.status config.sub autom4te.cache diff --git a/autogen.sh b/autogen.sh index 5b2ed6c..4a1e61f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,14 +1,34 @@ #!/bin/sh +# Run this to generate all the initial makefiles, etc. + +test -z "$AUTOMAKE" && AUTOMAKE=automake +test -z "$ACLOCAL" && ACLOCAL=aclocal +test -z "$AUTOCONF" && AUTOCONF=autoconf +test -z "$AUTOHEADER" && AUTOHEADER=autoheader + +#set -x #Get all required m4 macros required for configure -libtoolize -ci -aclocal - -#generate configure -autoconf +libtoolize --copy --force || exit 1 +$ACLOCAL -I m4 || exit 1 #Generate config.h.in -autoheader +$AUTOHEADER --force || exit 1 #Generate Makefile.in's -automake -ac +touch config.rpath +$AUTOMAKE --add-missing --copy --force || exit 1 + +if grep "IT_PROG_INTLTOOL" configure.ac >/dev/null ; then + intltoolize -c --automake --force || exit 1 + # po/Makefile.in.in has these lines: + # mostlyclean: + # rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp + # prevent $(GETTEXT_PACKAGE).pot from being deleted by `make clean` + sed 's/pox \$(GETTEXT_PACKAGE).pot/pox/' po/Makefile.in.in > po/Makefile.in.inx + mv -f po/Makefile.in.inx po/Makefile.in.in +fi + +#generate configure +$AUTOCONF --force || exit 1 + diff --git a/configure.ac b/configure.ac index a0725d5..1805d93 100644 --- a/configure.ac +++ b/configure.ac @@ -3,8 +3,9 @@ AC_INIT([gmrun], [0.9.5w]) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wall foreign]) -AC_CONFIG_MACRO_DIR([m4]) -AM_MAINTAINER_MODE +AC_CONFIG_MACRO_DIRS([m4]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +m4_ifdef([AM_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) LT_INIT AC_ISC_POSIX @@ -44,7 +45,7 @@ if test "x$enable_gtk3" = "xyes" ; then CFLAGS="$CFLAGS -DENABLE_GTK3" gtk_modules="gtk+-3.0 >= 3.0.0" else - gtk_modules="gtk+-2.0 >= 2.24.0" + gtk_modules="gtk+-2.0 >= 2.14.0" fi PKG_CHECK_MODULES(GTK, [$gtk_modules]) AC_SUBST(GTK_CFLAGS)