autostuff improvements:
authordoursse <doursse>
Sun, 4 Nov 2007 09:10:50 +0000 (09:10 +0000)
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 4 Nov 2007 09:10:50 +0000 (09:10 +0000)
 * use non deprecated version of AC_INIT and AM_INIT_AUTOMAKE
   and check the required minimal versions.
 * add bzipped distribution archive
 * add AC_LIBTOOL_WIN32_DLL
 * forbid libtool to check fortran and c++ compilers
 * compute libtool versioning from the version of the package
 * pass the directories based on ${prefix} to the preoprocessor
   with the -D option
 * replace INCLUDES, wich is deprecated since 2001 by AM_CPPFLAGS

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/eet@32336 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.in
src/bin/Makefile.am
src/lib/Makefile.am

index e5684b5..4ccda53 100644 (file)
@@ -1,19 +1,33 @@
 # get rid of that stupid cache mechanism
 rm -f config.cache
 
-AC_INIT(configure.in)
+AC_INIT(eet, 0.9.10.041, enlightenment-devel@lists.sourceforge.net)
+AC_PREREQ(2.52)
+AC_CONFIG_SRCDIR(configure.in)
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_ISC_POSIX
-AM_INIT_AUTOMAKE(eet, 0.9.10.041)
+
+AM_INIT_AUTOMAKE(1.6 dist-bzip2)
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AM_PROG_CC_STDC
 AC_HEADER_STDC
 AC_C_CONST
-AM_ENABLE_SHARED
-AM_PROG_LIBTOOL
+
+AC_LIBTOOL_WIN32_DLL
+define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
+define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
+AC_PROG_LIBTOOL
+
+VMAJ=`echo $PACKAGE_VERSION | awk -F . '{printf("%s", $1);}'`
+VMIN=`echo $PACKAGE_VERSION | awk -F . '{printf("%s", $2);}'`
+VMIC=`echo $PACKAGE_VERSION | awk -F . '{printf("%s", $3);}'`
+SNAP=`echo $PACKAGE_VERSION | awk -F . '{printf("%s", $4);}'`
+version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
+AC_SUBST(version_info)
+
 AC_FUNC_ALLOCA
 
 AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
@@ -72,35 +86,6 @@ int main (int argc, char **argv) {
 ], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
 )
 
-if test "x${bindir}" = 'xNONE'; then
-  if test "x${prefix}" = "xNONE"; then
-    PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
-  else
-    PACKAGE_BIN_DIR="${prefix}/bin"
-  fi
-else
-  PACKAGE_BIN_DIR="${bindir}"
-fi
-AC_SUBST(PACKAGE_BIN_DIR)
-
-if test "x${libdir}" = 'xNONE'; then
-  if test "x${prefix}" = "xNONE"; then
-    PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
-  else
-    PACKAGE_LIB_DIR="${prefix}/lib"
-  fi
-else
-  PACKAGE_LIB_DIR="${libdir}"
-fi
-AC_SUBST(PACKAGE_LIB_DIR)
-
-if test "x${prefix}" = "xNONE"; then
-  PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
-else
-  PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
-fi
-AC_SUBST(PACKAGE_DATA_DIR)
-
 #AM_CHECK_DOXYGEN()
 
 AC_OUTPUT([
@@ -128,12 +113,9 @@ echo "------------------------------------------------------------------------"
 echo
 echo "Configuration Options Summary:"
 echo
-#echo "  Build documentation..: $BUILD_DOCS"
-#echo
 echo "  Compilation..........: make"
 echo
 echo "  Installation.........: make install"
 echo
 echo "    prefix.............: $prefix"
-#echo "    documentation..: $datadir/$PACKAGE/doc"
 echo
index 051db2b..ece22b6 100644 (file)
@@ -1,9 +1,13 @@
-## Process this file with automake to produce Makefile.in
 
-AM_CFLAGS = \
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = \
 -I$(top_srcdir) \
 -I$(top_srcdir)/bin \
--I$(top_srcdir)/src/lib
+-I$(top_srcdir)/src/lib \
+-DPACKAGE_BIN_DIR=\"$(bindir)\" \
+-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\"
 
 bin_PROGRAMS = eet
 
index 8792672..0a98bce 100644 (file)
@@ -1,12 +1,12 @@
-## Process this file with automake to produce Makefile.in
 
-AUTOMAKE_OPTIONS     = 1.4 foreign
-
-# A list of all the files in the current directory which can be regenerated
 MAINTAINERCLEANFILES = Makefile.in
 
-INCLUDES            = -I. \
-                       -I$(top_srcdir)/src/lib
+AM_CPPFLAGS = \
+-I. \
+-I$(top_srcdir)/src/lib \
+-DPACKAGE_BIN_DIR=\"$(bindir)\" \
+-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\"
 
 lib_LTLIBRARIES      = libeet.la
 include_HEADERS      = Eet.h
@@ -20,4 +20,4 @@ Eet_private.h
 
 libeet_la_LIBADD       = -lz -ljpeg @fnmatch_libs@ @winsock_libs@ -lm
 libeet_la_DEPENDENCIES = $(top_builddir)/config.h
-libeet_la_LDFLAGS      = @create_shared_lib@ -version-info 9:10:9
+libeet_la_LDFLAGS      = @create_shared_lib@ -version-info @version_info@