diff --git a/Makefile.am b/Makefile.am index 3ed367b..3907b8f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 config.guess \ ltconfig ltmain.sh missing mkinstalldirs \ stamp-h.in -SUBDIRS = src filters doc loaders test demo libltdl +SUBDIRS = src filters doc loaders test demo bin_SCRIPTS = imlib2-config diff --git a/autogen.sh b/autogen.sh index 4483cd2..88ee7f3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,59 +1,13 @@ #!/bin/sh -# Run this to generate all the initial makefiles, etc. -# $Id$ -broken() { - echo - echo "You need libtool, autoconf, and automake. Install them" - echo "and try again. Get source at ftp://ftp.gnu.org/pub/gnu/" - echo "ERROR: $1 not found." - exit -1 -} +rm -rf autom4te.cache +rm -f aclocal.m4 -DIE=0 +echo "Running aclocal..."; aclocal $ACLOCAL_FLAGS -I m4 \ +&& echo "Running autoheader..."; autoheader \ +&& echo "Running autoconf..."; autoconf \ +&& echo "Running libtoolize..."; libtoolize --automake \ +&& echo "Running automake..."; automake --add-missing --copy --gnu -echo "Generating configuration files for Imlib2, please wait...." - -LIBTOOLIZE_CHOICES="$LIBTOOLIZE libtoolize" -AUTOHEADER_CHOICES="$AUTOHEADER autoheader213 autoheader-2.13 autoheader" -ACLOCAL_CHOICES="$ACLOCAL aclocal14 aclocal-1.4 aclocal" -AUTOMAKE_CHOICES="$AUTOMAKE automake14 automake-1.4 automake" -AUTOCONF_CHOICES="$AUTOCONF autoconf213 autoconf-2.13 autoconf" - -for i in $LIBTOOLIZE_CHOICES ; do - $i --version /dev/null 2>&1 && LIBTOOLIZE=$i && break -done -[ "x$LIBTOOLIZE" = "x" ] && broken libtool - -for i in $AUTOHEADER_CHOICES ; do - $i --version /dev/null 2>&1 && AUTOHEADER=$i && break -done -[ "x$AUTOHEADER" = "x" ] && broken autoconf - -for i in $ACLOCAL_CHOICES ; do - $i --version /dev/null 2>&1 && ACLOCAL=$i && break -done -[ "x$ACLOCAL" = "x" ] && broken automake - -for i in $AUTOMAKE_CHOICES ; do - $i --version /dev/null 2>&1 && AUTOMAKE=$i && break -done -[ "x$AUTOMAKE" = "x" ] && broken automake - -for i in $AUTOCONF_CHOICES ; do - $i --version /dev/null 2>&1 && AUTOCONF=$i && break -done -[ "x$AUTOCONF" = "x" ] && broken autoconf - -# Export them so configure can AC_SUBST() them. -export LIBTOOLIZE AUTOHEADER ACLOCAL AUTOMAKE AUTOCONF - -# Run the stuff. -(set -x && $LIBTOOLIZE -c -f --ltdl) -(set -x && $AUTOHEADER) -(set -x && $ACLOCAL $ACLOCAL_FLAGS -I m4) -(set -x && $AUTOMAKE -a -c) -(set -x && $AUTOCONF) - -# Run configure. -./configure `sh config.guess` "$@" +### If you want this, uncomment it. +./configure "$@" diff --git a/configure.in b/configure.in index 487309f..45ffc84 100644 --- a/configure.in +++ b/configure.in @@ -1,14 +1,22 @@ -dnl Process this file with autoconf to create configure. +# get rid of that stupid cache mechanism +rm -f config.cache -dnl# This stuff does not work for autoconf-2.13 -dnl# AC_INIT -dnl# AC_CONFIG_SRCDIR([src/Imlib2.h]) -AC_INIT([src/Imlib2.h]) -AC_CANONICAL_TARGET([]) +AC_INIT(configure.in) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_CANONICAL_TARGET +AC_ISC_POSIX AM_INIT_AUTOMAKE(imlib2, 1.1.1) - AM_CONFIG_HEADER(config.h) +AC_C_BIGENDIAN +AC_PROG_CC +AM_PROG_CC_STDC +AC_HEADER_STDC +AC_C_CONST +AM_ENABLE_SHARED +AM_PROG_LIBTOOL + if test "x${exec_prefix}" = "xNONE"; then if test "x${prefix}" = "xNONE"; then bindir="${ac_default_prefix}/bin"; @@ -118,26 +126,10 @@ AM_CONDITIONAL(HAVE_MMX, test x$mmx = xyes) pkglibdir='${libdir}'/imlib2_loaders AC_SUBST(pkglibdir) -AC_C_BIGENDIAN - -AC_PROG_CC -AM_PROG_CC_STDC -AC_C_CONST - -dnl# This doesn't work right. -dnl# AC_LIBLTDL_CONVENIENCE -dnl# AC_LIB_LTDL - -AM_PROG_LIBTOOL -AM_WITH_DMALLOC - -if test X"$enable_shared" = Xyes; then - DLLDFLAGS=-export-dynamic - AC_SUBST(DLLDFLAGS) -fi - -AC_PROG_INSTALL -AC_PROG_MAKE_SET +#if test X"$enable_shared" = Xyes; then +# DLLDFLAGS=-export-dynamic +# AC_SUBST(DLLDFLAGS) +#fi dnl AM_PROG_AS ASFLAGS="$ASFLAGS -I../" @@ -426,8 +418,16 @@ dnl# chmod +x imlib2-config dnl# ]],[[]]) dnl# AC_OUTPUT -AC_OUTPUT([imlib2-config imlib2.pc Makefile loaders/Makefile src/Makefile test/Makefile \ - filters/Makefile demo/Makefile doc/Makefile libltdl/Makefile \ - ],[ - chmod +x imlib2-config - ]) +AC_OUTPUT([ +Makefile +loaders/Makefile +src/Makefile +test/Makefile +filters/Makefile +demo/Makefile +doc/Makefile +imlib2-config +imlib2.pc +],[ +chmod +x imlib2-config +]) diff --git a/demo/Makefile.am b/demo/Makefile.am index eecffac..96b7759 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -16,7 +16,7 @@ if HAVE_X bin_PROGRAMS = imlib2_view imconvert imconvert_SOURCES = imconvert.c imlib2_view_SOURCES = view.c -LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la +LDADD = $(top_builddir)/src/libImlib2.la endif diff --git a/test/Makefile.am b/test/Makefile.am index edd8d22..fb12766 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -15,19 +15,19 @@ if HAVE_X bin_PROGRAMS = imlib2 bumpmaptest imlib2_test polytest color_spaces imlib2_SOURCES = main.c -imlib2_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la +imlib2_LDADD = $(top_builddir)/src/libImlib2.la bumpmaptest_SOURCES = bmtest.c -bumpmaptest_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la +bumpmaptest_LDADD = $(top_builddir)/src/libImlib2.la imlib2_test_SOURCES = imlib2_test.c -imlib2_test_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la +imlib2_test_LDADD = $(top_builddir)/src/libImlib2.la polytest_SOURCES = polytest.c -polytest_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la +polytest_LDADD = $(top_builddir)/src/libImlib2.la color_spaces_SOURCES = color_spaces.c -color_spaces_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la +color_spaces_LDADD = $(top_builddir)/src/libImlib2.la endif