update autogen.sh

This commit is contained in:
wdlkmpx 2020-08-24 19:27:20 +08:00
parent 54c03a2099
commit c4813e68e4
3 changed files with 32 additions and 10 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ compile
config.guess
config.h*
config.log
config.rpath
config.status
config.sub
autom4te.cache

View File

@ -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

View File

@ -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)