]> granicus.if.org Git - postgresql/commitdiff
Ordering of libraries changed so that -lbsd is *after* -lm
authorMarc G. Fournier <scrappy@hub.org>
Sun, 1 Jun 1997 16:25:34 +0000 (16:25 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Sun, 1 Jun 1997 16:25:34 +0000 (16:25 +0000)
Fixes a problem Darren reports with AIX, and doesn't seem to break either
FreeBSD or Linux(David?)...

src/configure
src/configure.in

index d155327fe3ddd6c4320e586d5cefc3e924af4153..1b3c71b5e3fce132db1851c7157b78cc950f9a58 100755 (executable)
@@ -1800,14 +1800,14 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:1805: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
+echo "configure:1805: checking for main in -lbsd" >&5
+ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lm  $LIBS"
+LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1813 "configure"
 #include "confdefs.h"
@@ -1831,26 +1831,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lm $LIBS"
+  LIBS="-lbsd $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
-echo "configure:1848: checking for main in -ldl" >&5
-ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:1848: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
+LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1856 "configure"
 #include "confdefs.h"
@@ -1874,26 +1874,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-ldl $LIBS"
+  LIBS="-lm $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:1891: checking for main in -lsocket" >&5
-ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
+echo "configure:1891: checking for main in -ldl" >&5
+ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lsocket  $LIBS"
+LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1899 "configure"
 #include "confdefs.h"
@@ -1917,26 +1917,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lsocket $LIBS"
+  LIBS="-ldl $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:1934: checking for main in -lnsl" >&5
-ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
+echo "configure:1934: checking for main in -lsocket" >&5
+ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lnsl  $LIBS"
+LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1942 "configure"
 #include "confdefs.h"
@@ -1960,26 +1960,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lnsl $LIBS"
+  LIBS="-lsocket $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
-echo "configure:1977: checking for main in -lipc" >&5
-ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
+echo "configure:1977: checking for main in -lnsl" >&5
+ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lipc  $LIBS"
+LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1985 "configure"
 #include "confdefs.h"
@@ -2003,26 +2003,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lipc $LIBS"
+  LIBS="-lnsl $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
-echo "configure:2020: checking for main in -lIPC" >&5
-ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
+echo "configure:2020: checking for main in -lipc" >&5
+ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lIPC  $LIBS"
+LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 2028 "configure"
 #include "confdefs.h"
@@ -2046,26 +2046,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lIPC $LIBS"
+  LIBS="-lipc $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
-echo "configure:2063: checking for main in -llc" >&5
-ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
+echo "configure:2063: checking for main in -lIPC" >&5
+ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-llc  $LIBS"
+LIBS="-lIPC  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 2071 "configure"
 #include "confdefs.h"
@@ -2089,26 +2089,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-llc $LIBS"
+  LIBS="-lIPC $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
-echo "configure:2106: checking for main in -ldld" >&5
-ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
+echo "configure:2106: checking for main in -llc" >&5
+ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-ldld  $LIBS"
+LIBS="-llc  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 2114 "configure"
 #include "confdefs.h"
@@ -2132,26 +2132,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-ldld $LIBS"
+  LIBS="-llc $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
-echo "configure:2149: checking for main in -lln" >&5
-ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
+echo "configure:2149: checking for main in -ldld" >&5
+ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lln  $LIBS"
+LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 2157 "configure"
 #include "confdefs.h"
@@ -2175,26 +2175,26 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo ln | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lln $LIBS"
+  LIBS="-ldld $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
-echo "configure:2192: checking for main in -lbsd" >&5
-ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
+echo "configure:2192: checking for main in -lln" >&5
+ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
+LIBS="-lln  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 2200 "configure"
 #include "confdefs.h"
@@ -2218,13 +2218,13 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo ln | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lbsd $LIBS"
+  LIBS="-lln $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
index 7ea79d6f0bdb8077cd13b35fd4c367183fc6a000..8c910fe4235caf73a6c33e87a6fd52609c99d1b3 100644 (file)
@@ -341,6 +341,7 @@ AC_CHECK_LIB(termcap,  main)
 AC_CHECK_LIB(history,  main)
 AC_CHECK_LIB(readline, main)
 AC_CHECK_LIB(readline, write_history, AC_DEFINE(HAVE_HISTORY))
+AC_CHECK_LIB(bsd,      main)
 AC_CHECK_LIB(m,        main)
 AC_CHECK_LIB(dl,       main)
 AC_CHECK_LIB(socket,   main)
@@ -350,7 +351,6 @@ AC_CHECK_LIB(IPC,      main)
 AC_CHECK_LIB(lc,       main)
 AC_CHECK_LIB(dld,      main)
 AC_CHECK_LIB(ln,       main)
-AC_CHECK_LIB(bsd,      main)
 AC_CHECK_LIB(ld,       main)
 AC_CHECK_LIB(compat,   main)
 AC_CHECK_LIB(BSD,      main)