From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Wed, 16 Oct 2002 04:39:19 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 345 ************************************************** Tuesday 15 October 2002 Number 345 ************************************************** Subjects for today 1 Re: Autoconf 2.53: wrongly resolved library search : Thomas Dickey 2 Autoconf 2.53: wrongly resolved library search : Thomas Hoffmann **= Email 1 ==========================** Date: Wed, 16 Oct 2002 19:41:40 -0400 From: Thomas Dickey Subject: Re: Autoconf 2.53: wrongly resolved library search On Wed, Oct 16, 2002 at 10:53:39PM +0100, Thomas Hoffmann wrote: > This is to check for an appearant error in autoconf 2.53 when > trying to resolve a cascaded library search: > > A plain library search from a configure.ac like > > AC_PREREQ(2.50) > AC_INIT([cascadebug], [1.0], [thoffman at zappa.sax.de]) > AC_CHECK_LIB(ncurses, main) > AC_OUTPUT > > is correctly resolved into the configure sh script. > > But a "cascaded" search as from this configure.ac > > AC_PREREQ(2.50) > AC_INIT([cascadebug], [1.0], [thoffman at zappa.sax.de]) > AC_PROG_CC > AC_CHECK_LIB(ncurses, main, [], > AC_CHECK_LIB(termcap, main, [], > AC_CHECK_LIB(termlib, main))) perhaps: AC_CHECK_LIB(ncurses, main, [], [ AC_CHECK_LIB(termcap, main, [], AC_CHECK_LIB(termlib, main))]) > (Just as a side note: all in all autoconf 2.5x makes debugging much > easier than 2.13, especially by means of readable log files). I don't find either difficult to read (but 2.53, like 2.51 had too many initial bug reports for me to bother with). -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 2 ==========================** Date: Wed, 16 Oct 2002 22:53:39 +0100 From: Thomas Hoffmann Subject: Autoconf 2.53: wrongly resolved library search This is to check for an appearant error in autoconf 2.53 when trying to resolve a cascaded library search: A plain library search from a configure.ac like AC_PREREQ(2.50) AC_INIT([cascadebug], [1.0], [thoffman at zappa.sax.de]) AC_CHECK_LIB(ncurses, main) AC_OUTPUT is correctly resolved into the configure sh script. But a "cascaded" search as from this configure.ac AC_PREREQ(2.50) AC_INIT([cascadebug], [1.0], [thoffman at zappa.sax.de]) AC_PROG_CC AC_CHECK_LIB(ncurses, main, [], AC_CHECK_LIB(termcap, main, [], AC_CHECK_LIB(termlib, main))) AC_OUTPUT is resolved into a syntactically wrong sh script, basically the lines around (note the LIBS= line!!) ...... if test "${ac_cv_lib_ncurses_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses which can conflict with char main (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ ....... Autoconf is: # autoconf --version autoconf (GNU Autoconf) 2.53b (release 2 for OS/2) Written by David J. MacKenzie and Akim Demaille. Copyright 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The shell is: at (#)PD KSH v5.2.14 99/07/13.2 Maybe Andreas can look into this? (Just as a side note: all in all autoconf 2.5x makes debugging much easier than 2.13, especially by means of readable log files). -- Thomas Hoffmann Telephone: 49-351-4598831 thoffman at zappa.sax.de Dresden, Germany ..sig under construction ...