On Monday 05 March 2007 22:47:45 Philip Kovacs wrote:
I think the thing to do is a) include both headers and be done with it or
b) code a small daemon function myself given that some unices may not have
it.
Why not use AC_LIBOBJ for option b ?
Davide Bolcioni
Yes, that is a great way to do it.
I added AC_CONFIG_LIBOBJ_DIR([lib]) to configure.ac, along with
AC_REPLACE_FUNCS([daemon setsid ...]). Then I created a subdir
lib/ in my project and a lib/Makefile.am:
----Makefile.am
noinst_LTLIBRARIES = libreplace.la
libreplace_la_SOURCES =
libreplace_la_LIBADD = @LTLIBOBJS@
-----
along with source files daemon.c, setsid.c etc.
Then I added $(top_builddir)/lib/libreplace.la to the _LDFLAGS
of all Makefile.am's that need these functions.
What's cool is when you cd lib/ and issue make, it builds a
libreplace.la containing *only* the functions that are not seen
during configure.
Very nice. Thanks for the tip.
Phil
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf