On Friday 27 March 2009 12:38:16 am Russ Allbery wrote: > "Gerald I. Evenden" <geraldi.even...@gmail.com> writes: > > On Thursday 26 March 2009 10:26:13 pm Russ Allbery wrote: > >> However, more fundamentally, you're reinventing AC_REPLACE_FUNC, which > >> you probably don't want to do. Check the Autoconf manual for > >> AC_REPLACE_FUNC, which does exactly what you're trying to do, even down > >> to how it adds additional source files to a variable that you can use > >> in Makefile.am. > > > > I had seen it but, again, I was unsure how it was going to work. I will > > reread. > > AC_REPLACE_FUNC([strcasecmp]) checks whether strcasecmp exists on the > system and, if not, adds it to LIBOBJS and LTLIBOBJS, which you can then > refer to in Makefile.am. In this case, you'd normally do something like: > > libproject_la_LIBADD = $(LTLIBOBJS) > > On systems without strcasecmp, the build system will then try to find a > strcasecmp.c file, compile it, and include it in libproject.la.
Sounds great, so I modified my configure.ac to: ... AC_FUNC_MALLOC AC_FUNC_STRTOD AC_CHECK_FUNCS([floor modf pow sqrt strchr strpbrk strspn strtol]) AC_REPLACE_FUNCS(strcasecmp strncasecmp) ... (The only added line was the last one) and added this to Makefile.am ... libproject_la_LIBADD = $(LTLIBOBJS) ... Then I ran autoconfig followed by "autoconfig -vfi" and got messages: ... configure.ac:34: required file `src/malloc.c' not found configure.ac:34: required file `src/strtod.c' not found autoreconf: automake failed with exit status: 1 I commented out AC_FUNC_MALLOC/STRTOD and then everything went to completion. Any suggestions. Note: the AC_FUNC_MALLOC and STRTOD were lines were from by autoscan's file autoconf.scan Thanks. Getting closer but not quite there yet. ;-) -- The whole religious complexion of the modern world is due to the absence from Jerusalem of a lunatic asylum. -- Havelock Ellis (1859-1939) British psychologist