configure: generate a script to run the compiler
No binary (build failed)
—
$ git checkout -f b78ca50cb3dda361f9c1e7a83af7e2e0fa0edbf2
Previous HEAD position was 446061e6cb cmake: repair cross compiling
HEAD is now at b78ca50cb3 configure: generate a script to run the compiler
$ git clean -fdx
Removing Makefile.in
Removing aclocal.m4
Removing autom4te.cache/
Removing compile
Removing confdefs.h
Removing config.guess
Removing config.log
Removing config.sub
Removing configure
Removing conftest.c
Removing depcomp
Removing docs/Makefile.in
Removing docs/cmdline-opts/Makefile.in
Removing docs/examples/Makefile.in
Removing docs/libcurl/Makefile.in
Removing docs/libcurl/opts/Makefile.in
Removing include/Makefile.in
Removing include/curl/Makefile.in
Removing install-sh
Removing lib/Makefile.in
Removing lib/curl_config.h.in
Removing ltmain.sh
Removing m4/libtool.m4
Removing m4/ltoptions.m4
Removing m4/ltsugar.m4
Removing m4/ltversion.m4
Removing m4/lt~obsolete.m4
Removing missing
Removing packages/Makefile.in
Removing packages/vms/Makefile.in
Removing run-compiler
Removing scripts/Makefile.in
Removing src/Makefile.in
Removing test-driver
Removing tests/Makefile.in
Removing tests/certs/Makefile.in
Removing tests/certs/scripts/Makefile.in
Removing tests/data/Makefile.in
Removing tests/http/Makefile.in
Removing tests/http/clients/Makefile.in
Removing tests/libtest/Makefile.in
Removing tests/server/Makefile.in
Removing tests/unit/Makefile.in
$ autoreconf -fi
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:123: installing './compile'
configure.ac:439: installing './config.guess'
configure.ac:439: installing './config.sub'
configure.ac:123: installing './install-sh'
configure.ac:129: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
$ bash -c find . -name config.guess -exec cp /usr/share/misc/config.guess {} \;
$ bash -c find . -name config.sub -exec cp /usr/share/misc/config.sub {} \;
$ chmod +x configure
$ ./configure --disable-shared --without-ssl --disable-docs
[TIMEOUT]
| @@ -186,6 +186,17 @@ dnl | |
| INITIAL_LDFLAGS=$LDFLAGS | |
| INITIAL_LIBS=$LIBS | |
| + | dnl |
| + | dnl Generates a shell script to run the compiler with LD_LIBRARY_PATH set to |
| + | dnl the value used right now. This lets CURL_RUN_IFELSE set LD_LIBRARY_PATH to |
| + | dnl something different but only have that affect the execution of the results |
| + | dnl of the compile, not change the libraries for the compiler itself. |
| + | dnl |
| + | compilersh="run-compiler" |
| + | echo "CC=$CC" > $compilersh |
| + | echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $compilersh |
| + | echo 'exec $CC $@' >> $compilersh |
| + | |
| dnl ********************************************************************** | |
| dnl See which TLS backend(s) that are requested. Just do all the | |
| dnl TLS AC_ARG_WITH() invokes here and do the checks later | |
| @@ -4396,6 +4407,8 @@ else | |
| fi | |
| AC_SUBST(LIBCURL_NO_SHARED) | |
| + | rm $compilersh |
| + | |
| dnl | |
| dnl For keeping supported features and protocols also in pkg-config file | |
| dnl since it is more cross-compile friendly than curl-config | |
| @@ -5866,11 +5866,14 @@ AC_DEFUN([CURL_RUN_IFELSE], [ | |
| AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) | |
| ;; | |
| *) | |
| + | oldcc=$CC |
| old=$LD_LIBRARY_PATH | |
| + | CC="sh ./run-compiler" |
| LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old | |
| export LD_LIBRARY_PATH | |
| AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) | |
| LD_LIBRARY_PATH=$old # restore | |
| + | CC=$oldcc |
| ;; | |
| esac | |
| ]) | |