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

Configure problem



I had some trouble using the new configure script on a
Slackware 3.1 system. It failed to detect my ncurses lib
and added some extra externs for strstr and getcwd. A little
digging discovered the conftest programs failed from
a bad command line, not missing libraries. They were linking
to X with only some of the needed flags. Here's a patch
to fix the ncurses and strstr sections. There may be others
like this, but these were the only two I needed to get it to work.
-----
		Mark Loftis<mloftis@lanminds.com>

diff --unified --recursive --new-file 1.5.6a/configure 1.5.6b/configure
--- 1.5.6a/configure	Tue Mar 31 12:10:56 1998
+++ 1.5.6b/configure	Thu Apr  2 01:03:25 1998
@@ -1843,7 +1843,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lncurses  $LIBS"
+LIBS="-lncurses  ${X_LIBS} $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1849 "configure"
 #include "confdefs.h"
@@ -2088,6 +2088,8 @@
 if eval "test \"`echo '$''{'ac_cv_func_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
+  ac_save_LIBS="$LIBS"
+  LIBS="${X_LIBS} ${LIBS}"
   cat > conftest.$ac_ext <<EOF
 #line 2093 "configure"
 #include "confdefs.h"
@@ -2122,6 +2124,7 @@
   eval "ac_cv_func_strstr=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
 fi
 
 if eval "test \"`echo '$ac_cv_func_'strstr`\" = yes"; then