From 62fcb695864ca79e6fc0843dc9d1f005e639b663 Mon Sep 17 00:00:00 2001 From: doursse Date: Sun, 20 Apr 2008 06:14:43 +0000 Subject: [PATCH] * use @datadir@/@PACKAGE@ and not @PACKAGE_DATA_DIR@ in embryo.pc.in * use --enable-auto-import with CeGCC * put WIN32_CFLAGS in CFLAGS and not CPPFLAGS * remove warning when configuring with newest (2.62) autoconf * clean MAINTAINERCLEANFILES and EXTRA_DIST * formatting (should be very close to how eet is formatted, now) SVN revision: 34320 --- legacy/embryo/Makefile.am | 50 ++++++++++++++++++++----------- legacy/embryo/configure.in | 22 ++++++++------ legacy/embryo/embryo.pc.in | 2 +- legacy/embryo/src/bin/Makefile.am | 9 +++--- legacy/embryo/src/lib/Makefile.am | 14 +++++---- 5 files changed, 59 insertions(+), 38 deletions(-) diff --git a/legacy/embryo/Makefile.am b/legacy/embryo/Makefile.am index de3a95277b..44b44d4067 100644 --- a/legacy/embryo/Makefile.am +++ b/legacy/embryo/Makefile.am @@ -1,24 +1,38 @@ SUBDIRS = src include -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ - config.h.in config.sub configure install-sh \ - ltconfig ltmain.sh missing mkinstalldirs \ - stamp-h.in build-stamp configure-stamp depcomp \ - embryo_docs.tar.gz embryo.c \ - README \ - embryo.pc \ - embryo.spec +MAINTAINERCLEANFILES = \ +Makefile.in \ +aclocal.m4 \ +compile \ +config.guess \ +config.h.in \ +config.sub \ +configure \ +depcomp \ +install-sh \ +ltmain.sh \ +missing \ +embryo_docs.tar.gz \ +m4/libtool.m4 \ +m4/lt~obsolete.m4 \ +m4/ltoptions.m4 \ +m4/ltsugar.m4 \ +m4/ltversion.m4 -bin_SCRIPTS = - -EXTRA_DIST = README AUTHORS COPYING COPYING-PLAIN \ - autogen.sh embryo.c.in gendoc \ - Doxyfile \ - README.in README \ - embryo.pc.in \ - embryo.spec.in embryo.spec \ - doc gendoc +EXTRA_DIST = \ +AUTHORS \ +COPYING \ +COPYING-PLAIN \ +autogen.sh \ +embryo.c.in \ +embryo.pc.in \ +embryo.spec.in \ +embryo.spec \ +README.in \ +README \ +Doxyfile \ +doc \ +gendoc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = embryo.pc - diff --git a/legacy/embryo/configure.in b/legacy/embryo/configure.in index 1fa0c5bbc1..5e44438872 100644 --- a/legacy/embryo/configure.in +++ b/legacy/embryo/configure.in @@ -16,6 +16,7 @@ AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AC_C_CONST +AM_PROG_CC_C_O AC_LIBTOOL_WIN32_DLL define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl @@ -30,9 +31,10 @@ version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN" AC_SUBST(version_info) WIN32_CFLAGS="" -create_shared_lib="" +lt_no_undefined="" +lt_enable_auto_import="" case "$host_os" in - mingw|mingw32*|cegcc) + mingw*|cegcc) PKG_CHECK_MODULES([EVIL], evil) AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed]) dnl needed for correct definition of EAPI @@ -40,30 +42,32 @@ case "$host_os" in AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defined to 1 (MinGW / CeGCC platform)]) if test "x$host_os" = "xcegcc" ; then WIN32_CFLAGS="-mwin32" + lt_enable_auto_import="-Wl,--enable-auto-import" fi - create_shared_lib="-no-undefined" + lt_no_undefined="-no-undefined" ;; *) AC_CHECK_FUNCS(gettimeofday) esac AC_SUBST(WIN32_CFLAGS) -AC_SUBST(create_shared_lib) +AC_SUBST(lt_no_undefined) +AC_SUBST(lt_enable_auto_import) dnl Checking for __attribute__ support AC_MSG_CHECKING([for __attribute__]) -AC_CACHE_VAL(have___attribute__, +AC_CACHE_VAL(_cv_have___attribute__, [ AC_TRY_COMPILE([#include ], [int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }], - [have___attribute__="yes"], - [have___attribute__="no"]) + [_cv_have___attribute__="yes"], + [_cv_have___attribute__="no"]) ] ) -if test "x${have___attribute__}" = "xyes" ; then +if test "x${_cv_have___attribute__}" = "xyes" ; then AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__]) fi -AC_MSG_RESULT(${have___attribute__}) +AC_MSG_RESULT(${_cv_have___attribute__}) AC_FUNC_ALLOCA diff --git a/legacy/embryo/embryo.pc.in b/legacy/embryo/embryo.pc.in index c5e085651a..8ffd2c62ec 100644 --- a/legacy/embryo/embryo.pc.in +++ b/legacy/embryo/embryo.pc.in @@ -1,6 +1,6 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -datadir=@PACKAGE_DATA_DIR@ +datadir=@datadir@/@PACKAGE@ libdir=@libdir@ includedir=@includedir@ embryoincludedir=@embryoincludedir@ diff --git a/legacy/embryo/src/bin/Makefile.am b/legacy/embryo/src/bin/Makefile.am index 6aad144b79..e26d1098a5 100644 --- a/legacy/embryo/src/bin/Makefile.am +++ b/legacy/embryo/src/bin/Makefile.am @@ -9,8 +9,7 @@ AM_CPPFLAGS = \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EVIL_CFLAGS@ \ -@WIN32_CFLAGS@ +@EVIL_CFLAGS@ bin_PROGRAMS = embryo_cc @@ -31,8 +30,10 @@ embryo_cc_scvars.c \ embryo_cc_prefix.c \ embryo_cc_prefix.h -embryo_cc_LDADD = @EVIL_LIBS@ -lm -embryo_cc_DEPENDENCIES = +embryo_cc_CFLAGS = @WIN32_CFLAGS@ +embryo_cc_LDADD = $(top_builddir)/src/lib/libembryo.la @EVIL_LIBS@ -lm +embryo_cc_LDFLAGS = @lt_enable_auto_import@ +embryo_cc_DEPENDENCIES = $(top_builddir)/src/lib/libembryo.la EXTRA_DIST = \ embryo_cc_sc5.scp \ diff --git a/legacy/embryo/src/lib/Makefile.am b/legacy/embryo/src/lib/Makefile.am index 08bd6cca4b..9b94e2c78a 100644 --- a/legacy/embryo/src/lib/Makefile.am +++ b/legacy/embryo/src/lib/Makefile.am @@ -9,11 +9,12 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@WIN32_CFLAGS@ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" + +include_HEADERS = Embryo.h + +lib_LTLIBRARIES = libembryo.la -lib_LTLIBRARIES = libembryo.la -include_HEADERS = Embryo.h libembryo_la_SOURCES = \ embryo_amx.c \ embryo_args.c \ @@ -23,8 +24,9 @@ embryo_rand.c \ embryo_str.c \ embryo_time.c -libembryo_la_LIBADD = -lm @fnmatch_libs@ +libembryo_la_CFLAGS = @WIN32_CFLAGS@ +libembryo_la_LIBADD = -lm @fnmatch_libs@ libembryo_la_DEPENDENCIES = $(top_builddir)/config.h -libembryo_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@ +libembryo_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info @version_info@ EXTRA_DIST = embryo_private.h