2

How can you use autoconf to determine if a symbol is defined in the httpd executable used by apxs?

At some point around apache v2.2 the apr_connect function was replaced with apr_socket_connect. To make a module compatible with multiple versions of apache I will need to use autoconf to create defines based on the availability of apr_connect or apr_socket_connect.

The current sources are at https://github.com/rritoch/PikeVM/blob/master/root/boot/system-1.1/apache/configure.ac

Are there any pre-defined macros for autoconf that can perform this test?

Ralph Ritoch
  • 3,260
  • 27
  • 37
  • They have deprecated apr_connect in apr 0.9 (that was 10 years ago), so just out of curiosity, what version apr are you trying to build against? Also, I assume you should be able to use nm to list symbols in the httpd file and define macro based on result. – Boris Dec 09 '13 at 21:32
  • Also, what's stopping you from checking what's in the the apr_network_io.h file. – Boris Dec 09 '13 at 21:37
  • @Boris, I like the nm idea but is there a command to get apxs to output the bin directory where the httpd binary is that is being built against? I'll also look at the apr_network_io.h file, if that has something I can use than I may not need to add a autoconf test for this feature. – Ralph Ritoch Dec 10 '13 at 02:11
  • 1
    You can always run apxs2 -q SBINDIR and apxs2 -q TARGET to get the location and name of the binary. – Boris Dec 12 '13 at 00:59

0 Answers0