DEC Alpha does not need -ldl, therefore check for it.
authorUnknown (HB) <nobody@localhost>
Wed, 9 Sep 1998 07:57:51 +0000 (07:57 +0000)
committerUnknown (HB) <nobody@localhost>
Wed, 9 Sep 1998 07:57:51 +0000 (07:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
setup/maketmpl.in
wx-config.in

index f0f16f2fbc7e5de31b1c02786dd6a23ef3b7c198..930c3c15fab8c265ebaf1cdaafab12638a6f46ef 100755 (executable)
--- a/configure
+++ b/configure
@@ -6353,7 +6353,42 @@ if test "$USE_OPENGL" = 1 ; then
 fi
 
 
-DL_LIBRARY=-ldl
+echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
+echo "configure:6358: 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="-ldl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6366 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  DL_LIBRARY=-ldl
+else
+  echo "$ac_t""no" 1>&6
+DL_LIBRARY=
+fi
 
 
 
@@ -6374,7 +6409,7 @@ if test "$USE_THREADS" = "1"; then
 
   
   echo $ac_n "checking for pthread_create in -lpthread-0.7""... $ac_c" 1>&6
-echo "configure:6378: checking for pthread_create in -lpthread-0.7" >&5
+echo "configure:6413: checking for pthread_create in -lpthread-0.7" >&5
 ac_lib_var=`echo pthread-0.7'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6382,7 +6417,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread-0.7  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6386 "configure"
+#line 6421 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6393,7 +6428,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6417,17 +6452,17 @@ else
 
     ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6
-echo "configure:6421: checking for sys/prctl.h" >&5
+echo "configure:6456: checking for sys/prctl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6426 "configure"
+#line 6461 "configure"
 #include "confdefs.h"
 #include <sys/prctl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6453,7 +6488,7 @@ fi
 
         
     echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6
-echo "configure:6457: checking for pthread_setcanceltype in -lpthread" >&5
+echo "configure:6492: checking for pthread_setcanceltype in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_setcanceltype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6461,7 +6496,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6465 "configure"
+#line 6500 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6472,7 +6507,7 @@ int main() {
 pthread_setcanceltype()
 ; return 0; }
 EOF
-if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6499,7 +6534,7 @@ fi
 fi
 
   echo $ac_n "checking for pthread_setcanceltype in -lpthreads""... $ac_c" 1>&6
-echo "configure:6503: checking for pthread_setcanceltype in -lpthreads" >&5
+echo "configure:6538: checking for pthread_setcanceltype in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'pthread_setcanceltype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6507,7 +6542,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6511 "configure"
+#line 6546 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6518,7 +6553,7 @@ int main() {
 pthread_setcanceltype()
 ; return 0; }
 EOF
-if { (eval echo configure:6522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6562,7 +6597,7 @@ OPENGL_LINK=
 
 if test "$USE_OPENGL" = 1; then
     echo $ac_n "checking for OpenGL includes""... $ac_c" 1>&6
-echo "configure:6566: checking for OpenGL includes" >&5
+echo "configure:6601: checking for OpenGL includes" >&5
   
 ac_find_includes=
 for ac_dir in $SEARCH_INCLUDE;
@@ -6577,7 +6612,7 @@ for ac_dir in $SEARCH_INCLUDE;
     OPENGL_INCLUDE="-I$ac_find_includes"
     echo "$ac_t""found $ac_find_includes" 1>&6
         echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
-echo "configure:6581: checking for OpenGL library" >&5
+echo "configure:6616: checking for OpenGL library" >&5
     
 ac_find_libraries=
 for ac_dir in $SEARCH_LIB;
index 03e14549627e9f8624f0fbaced44742ac1e14c74..860ffa7576baf7320fa6234050c1db07d9b3f8d3 100644 (file)
@@ -1312,8 +1312,7 @@ dnl ----------------------------------------------------------------
 dnl select  dynamic loader (used by iODBC to load drivers)
 dnl ----------------------------------------------------------------
 
-DL_LIBRARY=-ldl
-
+AC_CHECK_LIB(dl,main,[DL_LIBRARY=-ldl],[DL_LIBRARY=])
 AC_SUBST(DL_LIBRARY)
 
 dnl ----------------------------------------------------------------
index 9c6592865d2cb2c0adbf68a06787dad5989198b2..3b46d09403fe791a43223c42463d44e71900311d 100644 (file)
@@ -109,7 +109,7 @@ WX_LIBS = -L$(GLOBAL_LIB_DIR) -lwx_gtk
 
 OPENGL_LIBS = $(OPENGL_LIBRARY) $(OPENGL_LINK)
 
-GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) -ldl
+GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) @DL_LIBRARY@
 
 LINK = $(CXX) -o $@
 LINK_LIBS= \
index 0dbdbca3be47d3fc39817e84c565357383d95eb4..83cff55b82b70ce932c85d3f70bf301d40c92c7b 100755 (executable)
@@ -45,7 +45,7 @@ while test $# -gt 0; do
       echo $includes -D@TOOLKIT_DEF@ @GUI_TK_INCLUDE@
       ;;
     --libs)
-      echo -L@libdir@ -lwx_gtk -ldl @GUI_TK_LIBRARY@ @THREADS_LINK@ @EXTRA_LINK@
+      echo -L@libdir@ -lwx_gtk @DL_LIBRARY@ @GUI_TK_LIBRARY@ @THREADS_LINK@ @EXTRA_LINK@
       ;;
     *)
       echo "${usage}" 1>&2