forked from AuroraMiddleware/gtk
Clean autotools configuration a bit
New requirements: automake >= 1.10 libtool >= 2.2
This commit is contained in:
parent
1205012cb4
commit
9e630dc17d
@ -4,8 +4,7 @@ include $(top_srcdir)/Makefile.decl
|
||||
SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
EXTRA_DIST += \
|
||||
HACKING \
|
||||
|
12
autogen.sh
12
autogen.sh
@ -19,14 +19,14 @@ if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
|
||||
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*|1.5*|2.2*)
|
||||
2.2*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_libtool ; then : ; else
|
||||
echo
|
||||
echo "You must have libtool 1.4 installed to compile $PROJECT."
|
||||
echo "You must have libtool 2.2 installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
|
||||
DIE=1
|
||||
@ -54,18 +54,14 @@ if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.10
|
||||
ACLOCAL=aclocal-1.10
|
||||
else if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
echo
|
||||
echo "You must have automake 1.7.x, 1,10.x or 1.11.x installed to compile $PROJECT."
|
||||
echo "You must have automake 1,10.x or 1.11.x installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
|
||||
DIE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
@ -109,8 +105,6 @@ rm -rf autom4te.cache
|
||||
# regenerated from their corresponding *.in files by ./configure anyway.
|
||||
touch README INSTALL
|
||||
|
||||
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
gtkdocize || exit $?
|
||||
|
||||
|
50
configure.ac
50
configure.ac
@ -1,6 +1,6 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
# require autoconf 2.54
|
||||
AC_PREREQ(2.62)
|
||||
AC_PREREQ([2.62])
|
||||
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
@ -41,15 +41,15 @@ AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define -Wno-portability dist-bzip2])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([1.10 no-define -Wno-portability dist-bzip2])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
# Support silent build rules, requires at least automake-1.11. Enable
|
||||
# by either passing --enable-silent-rules to configure or passing V=0
|
||||
@ -120,6 +120,14 @@ AC_SUBST(GDK_PIXBUF_MINOR)
|
||||
AC_SUBST(GDK_PIXBUF_MICRO)
|
||||
AC_SUBST(GDK_PIXBUF_VERSION)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
|
||||
GETTEXT_PACKAGE=gtk30
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
@ -158,17 +166,12 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Initialize libtool
|
||||
AC_PROG_CC
|
||||
AM_DISABLE_STATIC
|
||||
|
||||
dnl
|
||||
dnl Check for a working C++ compiler, but do not bail out, if none is found.
|
||||
dnl We use this for an automated test for C++ header correctness.
|
||||
dnl
|
||||
AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
|
||||
AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
|
||||
@ -178,7 +181,7 @@ CXXFLAGS="$CXXFLAGS -x objective-c++"
|
||||
AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
|
||||
AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
|
||||
CXXFLAGS="$gtk_save_cxxflags"
|
||||
AC_LANG_RESTORE
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
if test "$os_win32" = "yes"; then
|
||||
if test x$enable_static = xyes -o x$enable_static = x; then
|
||||
@ -191,11 +194,11 @@ if test "$os_win32" = "yes"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
dnl when using libtool 2.x create libtool early, because it's used in configure
|
||||
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
|
||||
|
||||
dnl Initialize libtool
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT([disable-static win32-dll])
|
||||
# Create libtool early, because it's used in configure
|
||||
LT_OUTPUT
|
||||
|
||||
# Make sure we use 64-bit versions of various file stuff.
|
||||
AC_SYS_LARGEFILE
|
||||
@ -203,9 +206,6 @@ AC_SYS_LARGEFILE
|
||||
AM_PROG_AS
|
||||
AC_PATH_PROG(NM, nm, nm)
|
||||
|
||||
dnl Initialize maintainer mode
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_MSG_CHECKING([for some Win32 platform])
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
@ -257,7 +257,7 @@ AC_ARG_ENABLE(rebuilds,
|
||||
[enable_rebuilds=yes])
|
||||
AC_ARG_ENABLE(visibility,
|
||||
[AC_HELP_STRING([--disable-visibility],
|
||||
[don't use ELF visibility attributes])],,
|
||||
[do not use ELF visibility attributes])],,
|
||||
[enable_visibility=yes])
|
||||
|
||||
AC_ARG_WITH(xinput,
|
||||
@ -308,13 +308,6 @@ AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
|
||||
# Build time sanity check...
|
||||
AM_SANITY_CHECK
|
||||
|
||||
# Checks for programs.
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
@ -373,9 +366,6 @@ if test x"$os_win32" = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
## Initial sanity check, done here so that users get told they
|
||||
## have the wrong dependencies as early in the process as possible.
|
||||
## Later on we actually use the cflags/libs from separate pkg-config
|
||||
|
Loading…
Reference in New Issue
Block a user