[Freeswitch-dev] Autoconfig problem on FC12

Eric Varsanyi sipx95 at eljv.com
Tue Jan 19 07:54:04 PST 2010

I'm building freeswitch RPM packages using the sipxecs build system and the rpm packaging step was failing because libjs.so was not being built. After some digging it looks to me like a dependency problem in the libjs autoconfig setup. The patch below works around the issue but there's likely a better way.

-Eric Varsanyi


The proximal issue is that EGREP is not defined when checking for the ability to make shared libs.

The problem is some sort of dependency issue between AC_CHECK_HEADER and AC_PROG_LIBTOOL.

It appears that using AC_CHECK_HEADER at 'autoconf' time remembers that the check for, say, EGREP has been done and prevents it from being issued again in the resulting configure script, however if AC_CHECK_HEADER is used in a runtime 'if' block (the 'if' runs when configure runs, not autoconf) and that if does not pay off AC_PROG_LIBTOOL ends up w/o EGREP defined and the check if we can build a shared library fails (and thus no .so is built).

A simple workaround is to move AC_PROG_LIBTOOL up above the AC_ARG_WITH([dso ... check which uses AC_CHECK_HEADER in a bash if block (which does not pay off on linux). I'm no autoconf wizard and my lame attempts to force it to check for EGREP again failed -- it may be you're just not supposed to use some things inside an 'if' block at 'configure' time.

Index: libs/js/configure.ac
--- libs/js/configure.ac	(revision 16398)
+++ libs/js/configure.ac	(working copy)
@@ -154,6 +154,8 @@

dnl #   configure option --with-dso
	AS_HELP_STRING([--with-dso], [build without DSO object (allows run-time process extending)]),
@@ -229,8 +231,6 @@


AC_CONFIG_FILES([Makefile js.pc js-config.sh src/perlconnect/Makefile.PL])

More information about the FreeSWITCH-dev mailing list