autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PROG_CC now required?


From: Akim Demaille
Subject: Re: AC_PROG_CC now required?
Date: 24 Apr 2001 11:55:24 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

>>>>> "Harlan" == Harlan Stenn <address@hidden> writes:

Harlan> Found it (mostly).  The following configure.in will fail:

Harlan>  AC_INIT(sidai, 1.0, address@hidden)
Harlan> AM_INIT_AUTOMAKE(sidai, 1.0)

Harlan>  AC_PROG_MAKE_SET

Harlan>  AC_CANONICAL_BUILD

Harlan>  AC_PATH_X

Harlan>  AC_OUTPUT

Harlan> It works fine without the AC_PATH_X.

Well, AC_PATH_X calls _AC_PATH_X_DIRECT which 

> if test "$ac_x_libraries" = no; then
>   # Check for the libraries.
>   # See if we find them without any special options.
>   # Don't add to $LIBS permanently.
>   ac_save_LIBS=$LIBS
>   LIBS="-lXt $LIBS"
>   AC_TRY_LINK(address@hidden:@include <X11/Intrinsic.h>], [XtMalloc (0)],
> [LIBS=$ac_save_LIBS
> # We can link X programs with no special library path.
> ac_x_libraries=],
> [LIBS=$ac_save_LIBS
> for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
> do
>   # Don't even attempt the hair of trying to link an X program!
>   for ac_extension in a so sl; do
>     if test -r $ac_dir/libXt.$ac_extension; then
>       ac_x_libraries=$ac_dir
>       break 2
>     fi
>   done
> done])
> fi # $ac_x_libraries = no

which does involve an AC_TRY_LINK.  So I'd call this a 2.13 bug, or a
mis-design of AC_PATH_X, but in any case I prefer 2.50's behavior.

/tmp % cat configure.in                                          nostromo 11:53
AC_INIT
AC_PATH_X
AC_OUTPUT
/tmp % autoconf --version                                        nostromo 11:54
Autoconf version 2.13
/tmp % autoconf                                                  nostromo 11:54

/tmp % fgrep '$ac_link' configure                                nostromo 11:54
if { (eval echo configure:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then

So it does link somewhere

/tmp % ./configure                                               nostromo 11:55
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
updating cache ./config.cache
creating ./config.status


but does not look for a compiler.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]