From 40919f88bca20a30ae9c1b76d2c0f02df68488bb Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Thu, 30 Aug 2018 21:13:10 +0000 Subject: [PATCH] Revert 1839628, backport of 1839627 This macro does not result in a usable CC_FOR_BUILD Corresponds to unsuccessful pull request #8. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1839702 13f79535-47bb-0310-9956-ffa450edef68 --- Makefile.in | 10 +++++++--- build/buildcheck.sh | 4 +--- configure.in | 3 --- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index a6e0f25c0ea..1c7317638ec 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@ CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ build/apr_rules.out tools/gen_test_char@EXEEXT@ \ - tools/gen_test_char.o \ + tools/gen_test_char.o tools/gen_test_char.lo \ include/private/apr_escape_test_char.h DISTCLEAN_TARGETS = config.cache config.log config.status \ include/apr.h include/arch/unix/apr_private.h \ @@ -130,9 +130,13 @@ check: $(TARGET_LIB) etags: etags `find . -name '*.[ch]'` -tools/gen_test_char@EXEEXT@: tools/gen_test_char.c +OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) +tools/gen_test_char.lo: tools/gen_test_char.c $(APR_MKDIR) tools - $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@ + $(LT_COMPILE) + +tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) + $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ $(APR_MKDIR) include/private diff --git a/build/buildcheck.sh b/build/buildcheck.sh index 44921b50234..76ff8cef285 100755 --- a/build/buildcheck.sh +++ b/build/buildcheck.sh @@ -40,9 +40,7 @@ fi # output is multiline from 1.5 onwards # Require libtool 1.4 or newer -if test -z "$libtool"; then - libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` -fi +libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` if test -z "$lt_pversion"; then echo "buildconf: libtool not found." diff --git a/configure.in b/configure.in index 70019368578..9e07c666680 100644 --- a/configure.in +++ b/configure.in @@ -183,9 +183,6 @@ dnl can only be used once within a configure script, so this prevents a dnl preload section from invoking the macro to get compiler info. AC_PROG_CC -dnl Check build CC for gen_test_char compiling which is executed at build time. -AX_PROG_CC_FOR_BUILD - dnl AC_PROG_SED is only avaliable in recent autoconf versions. dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present. ifdef([AC_PROG_SED],