Configure check for smbwrapper
Tim Potter
tpot at acsys.anu.edu.au
Fri Nov 20 04:22:07 GMT 1998
> > OK, here's a bit of autoconf to do most of the check. Unfortunately the
> > AC_DEFINE(LD_PRELOAD) doesn't seem to do anything to include/config.h.
>
> That's right, you must add `#undef LD_PRELOAD' (or HAVE_LD_PRELOAD,
> according to your macro :-) to acconfig.h
Thought I did that... I'll try it again.
> > AC_TRY_COMMAND($CC $CFLAGS -c conf-preload.c)
> > AC_TRY_COMMAND($CC $LDSHFLAGS $CFLAGS -o libconf-preload1.so conf-preload1.c)
> > AC_TRY_COMMAND($CC $LDSHFLAGS $CFLAGS -o libconf-preload2.so conf-preload2.c)
> > AC_TRY_COMMAND($CC $CFLAGS $CPPFLAGS -o conftest conf-preload.o ./libconf-preload1.so)
>
> AC_TRY_COMMAND does not exist (or is not documented) in autoconf 2.12;
> is this a new extension? Why don't you just run the commands one
> after another? (>/dev/null 2>&1, of course :-)
Good idea. I found the AC_TRY_COMMAND macro in acgeneral.m4 of my
autoconf 2.12 installation.
> > LD_PRELOAD=./libconf-preload2.so; export LD_PRELOAD
> > AC_TRY_COMMAND(conftest > conf.out)
>
> Never trust that `.' is in the PATH; better run ./conftest. BTW, why
> don't you just redirect the output to /dev/null?
Oops - debugging statement left in.
> Since you're within AC_CACHE_CHECK, don't print results yourself, and
> don't do the final action within the cache block, otherwise it won't
> take place if the value is cached already. So, I'd suggest:
[...]
I've made the changes you suggested and it all works now. Thanks! Do you
think it is worth moving the C programs into the source/tests directory?
It might make the configure.in a bit cleaner.
Tim.
> --
> Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org}
> oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org.au}
> Universidade Estadual de Campinas, SP, Brasil
>
More information about the samba-technical
mailing list