autostuff improvements:

* 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
 * remove useless -L flags in *_la_LDFLAGS


SVN revision: 32340
This commit is contained in:
doursse 2007-11-04 09:44:15 +00:00 committed by doursse
parent d15dcd181c
commit 59d2a4a627
3 changed files with 60 additions and 47 deletions

View File

@ -1,11 +1,14 @@
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(configure.in)
AC_INIT(embryo, 0.9.1.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(embryo, 0.9.1.041)
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
AM_CONFIG_HEADER(config.h)
AC_C_BIGENDIAN
@ -13,8 +16,19 @@ 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_FUNCS(gettimeofday)
@ -46,35 +60,6 @@ fi
AC_SUBST(fnmatch_libs)
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)
embryoincludedir='${datadir}/include'
AC_SUBST(embryoincludedir)
@ -89,3 +74,23 @@ README
embryo.spec
debian/changelog
])
#####################################################################
## Info
echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo " Compilation..........: make"
echo
echo " Installation.........: make install"
echo
echo " prefix.............: $prefix"
echo

View File

@ -1,9 +1,14 @@
MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -DLINUX -I$(top_srcdir)/src/lib -I$(top_srcdir) -I$(top_builddir) \
-DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \
-DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \
-DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\"
AM_CPPFLAGS = \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir) \
-I$(top_builddir) \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\"
bin_PROGRAMS = embryo_cc
@ -24,8 +29,8 @@ embryo_cc_scvars.c \
embryo_cc_prefix.c \
embryo_cc_prefix.h
embryo_cc_LDADD =
embryo_cc_DEPENDENCIES =
embryo_cc_LDADD = -lm
embryo_cc_DEPENDENCIES =
EXTRA_DIST = \
embryo_cc_sc5.scp \

View File

@ -1,12 +1,15 @@
MAINTAINERCLEANFILES = Makefile.in
AUTOMAKE_OPTIONS = 1.4 foreign
INCLUDES = -I. \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include
AM_CPPFLAGS = \
-I. \
-I$(top_srcdir)/src/lib \
-I$(top_builddir) \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\"
lib_LTLIBRARIES = libembryo.la
include_HEADERS = Embryo.h
@ -22,4 +25,4 @@ embryo_private.h
libembryo_la_LIBADD = -lm @fnmatch_libs@
libembryo_la_DEPENDENCIES = $(top_builddir)/config.h
libembryo_la_LDFLAGS = @create_shared_lib@ -version-info 9:1:9
libembryo_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@