From: Robin Subject: Error checking for dlfcn.h header To: address@hidden Date: Thu, 9 Oct 2003 15:33:05 -0500 X-Sent: 3 days, 12 hours, 31 minutes, 2 seconds ago Hi, I get an error running the dlfcn.h header check inside a configure file. A snippet from the output log is as follows: ######################################################################## ### Initializing libtool ### ######################################################################## checking for a sed that does not truncate output... /bin/sed checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking dlfcn.h usability... yes checking dlfcn.h presence... configure: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: dlfcn.h: proceeding with the preprocessor's result no configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to address@hidden ## configure: WARNING: ## ------------------------------------ ## checking for dlfcn.h... no checking how to run the C++ preprocessor... g++ -E A look at the config.log file reveals that the value for the preprocessor is not set, which causes the dlfcn.h presence check to fail. And sure enough, if you run it like this: CXXCPP="g++ -E" ./configure the above test completes successfully. What gives? Is this really a bug in autoconf? I am not entirely sure if this is an autoconf bug, since it could be in libtool -- the above lines I think are related to the AC_PROG_LIBTOOL target in my configure.in. If it has nothing to do with autoconf as such, please let me know where to complain :-) It seems to me that the check for dlfcn.h, which relies on the C++ preprocessor, should be executed after the check for said preprocessor. Regards, Robin