We remove the AM_MAINTAINER_MODE for now, to recreate files when necessary. Several macro names have been updated (according to what autoupdate suggests: AC_CANONICAL_[SYSTEM->TARGET], AC_TRY_LINK-> AC_LINK_IFELSE, AC_TRY_COMPILE -> AC_COMPILE_IFELSE). We also add a new --enable-debug switch which is propagated from toplevel.
FIXME: why do we remove testsuite/Makefile? Signed-off-by: Robert Schwebel <[EMAIL PROTECTED]> libffi/configure.ac | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) Index: libffi/configure.ac =================================================================== --- libffi/configure.ac.orig +++ libffi/configure.ac @@ -1,13 +1,13 @@ dnl Process this with autoconf to create configure -AC_PREREQ(2.59) +AC_PREREQ(2.61) -AC_INIT([libffi], [2.1], [http://gcc.gnu.org/bugs.html]) +AC_INIT([libffi],[2.1],[http://gcc.gnu.org/bugs.html]) AC_CONFIG_HEADERS([fficonfig.h]) -AM_ENABLE_MULTILIB(, ..) +# AM_ENABLE_MULTILIB(, ..) -AC_CANONICAL_SYSTEM +AC_CANONICAL_TARGET target_alias=${target_alias-$host_alias} . ${srcdir}/configure.host @@ -30,8 +30,6 @@ AM_PROG_AS AM_PROG_CC_C_O AC_PROG_LIBTOOL -AM_MAINTAINER_MODE - AC_CHECK_HEADERS(sys/mman.h) AC_CHECK_FUNCS(mmap) AC_FUNC_MMAP_BLACKLIST @@ -144,9 +142,7 @@ if test x$TARGET = xSPARC; then save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -fpic" LDFLAGS="$LDFLAGS -shared" - AC_TRY_LINK([asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");],, - [libffi_cv_as_sparc_ua_pcrel=yes], - [libffi_cv_as_sparc_ua_pcrel=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");]], [[]])],[libffi_cv_as_sparc_ua_pcrel=yes],[libffi_cv_as_sparc_ua_pcrel=no]) CFLAGS="$save_CFLAGS" LDFLAGS="$save_LDFLAGS"]) if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then @@ -158,9 +154,7 @@ if test x$TARGET = xSPARC; then libffi_cv_as_register_pseudo_op, [ libffi_cv_as_register_pseudo_op=unknown # Check if we have .register - AC_TRY_COMPILE([asm (".register %g2, #scratch");],, - [libffi_cv_as_register_pseudo_op=yes], - [libffi_cv_as_register_pseudo_op=no]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[asm (".register %g2, #scratch");]], [[]])],[libffi_cv_as_register_pseudo_op=yes],[libffi_cv_as_register_pseudo_op=no]) ]) if test "x$libffi_cv_as_register_pseudo_op" = xyes; then AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1, @@ -229,11 +223,24 @@ AC_SUBST(TARGETDIR) AC_SUBST(SHELL) +# +# Debugging +# +AC_MSG_CHECKING([whether to enable debugging]) AC_ARG_ENABLE(debug, -[ --enable-debug debugging mode], - if test "$enable_debug" = "yes"; then - AC_DEFINE(FFI_DEBUG, 1, [Define this if you want extra debugging.]) - fi) + AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=yes@:>@]), + [case "$enableval" in + y | yes) CONFIG_DEBUG=yes ;; + *) CONFIG_DEBUG=no ;; + esac], + [CONFIG_DEBUG=yes]) +AC_MSG_RESULT([${CONFIG_DEBUG}]) +if test "${CONFIG_DEBUG}" = "yes"; then + CFLAGS="${CFLAGS} -Wall -Wsign-compare -Wfloat-equal -Wformat-security -g -O1" + AC_DEFINE(FFI_DEBUG, 1, [Define this if you want extra debugging]) +else + CFLAGS="${CFLAGS} -O2" +fi AC_ARG_ENABLE(structs, [ --disable-structs omit code for struct support], @@ -283,6 +290,7 @@ test -d src/$TARGETDIR || mkdir src/$TAR AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h) -AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile) +## AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile) +AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile) AC_OUTPUT -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 _______________________________________________ Developers mailing list [email protected] http://dotgnu.org/mailman/listinfo/developers
