[singular] 04/09: 443: configure should check for nanosleep in -lrt

felix salfelder felix-guest at alioth.debian.org
Tue Sep 3 20:24:45 UTC 2013


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master-3-1-5
in repository singular.

commit 77bd1f4d689d2b928dfa44ebb241e68e2da38afb
Author: Felix Salfelder <felix at salfelder.org>
Date:   Tue Sep 3 20:07:59 2013 +0200

    443: configure should check for nanosleep in -lrt
---
 Singular/configure    |  139 +++++++++++++++++++++++--------------------------
 Singular/configure.in |   11 ++--
 2 files changed, 70 insertions(+), 80 deletions(-)

diff --git a/Singular/configure b/Singular/configure
index 3a3b6a5..6fd69b0 100755
--- a/Singular/configure
+++ b/Singular/configure
@@ -742,12 +742,8 @@ LDFLAGS
 LIBS
 CPPFLAGS
 CPP
-CPPFLAGS
 CXX
 CXXFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
 CCC
 CXXCPP'
 
@@ -5413,9 +5409,9 @@ _ACEOF
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for  in -lnsl" >&5
-$as_echo_n "checking for  in -lnsl... " >&6; }
-if ${ac_cv_lib_nsl_+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5429,27 +5425,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char  ();
+char gethostbyname ();
 int
 main ()
 {
-return  ();
+return gethostbyname ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_=yes
+  ac_cv_lib_nsl_gethostbyname=yes
 else
-  ac_cv_lib_nsl_=no
+  ac_cv_lib_nsl_gethostbyname=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_" >&5
-$as_echo "$ac_cv_lib_nsl_" >&6; }
-if test "x$ac_cv_lib_nsl_" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBNSL 1
 _ACEOF
@@ -5458,9 +5454,9 @@ _ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for  in -lsocket" >&5
-$as_echo_n "checking for  in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for accept in -lsocket" >&5
+$as_echo_n "checking for accept in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_accept+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5474,27 +5470,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char  ();
+char accept ();
 int
 main ()
 {
-return  ();
+return accept ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_=yes
+  ac_cv_lib_socket_accept=yes
 else
-  ac_cv_lib_socket_=no
+  ac_cv_lib_socket_accept=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_" >&5
-$as_echo "$ac_cv_lib_socket_" >&6; }
-if test "x$ac_cv_lib_socket_" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_accept" >&5
+$as_echo "$ac_cv_lib_socket_accept" >&6; }
+if test "x$ac_cv_lib_socket_accept" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSOCKET 1
 _ACEOF
@@ -5503,6 +5499,52 @@ _ACEOF
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_open in -lrt" >&5
+$as_echo_n "checking for sem_open in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sem_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_open ();
+int
+main ()
+{
+return sem_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sem_open=yes
+else
+  ac_cv_lib_rt_sem_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_open" >&5
+$as_echo "$ac_cv_lib_rt_sem_open" >&6; }
+if test "x$ac_cv_lib_rt_sem_open" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+  LIBS="-lrt $LIBS"
+
+fi
+
+
 SAVE_LIBS=${LIBS}
 LIBS=
 
@@ -8978,55 +9020,6 @@ else
 $as_echo "no" >&6; }
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for  in -lrt" >&5
-$as_echo_n "checking for  in -lrt... " >&6; }
-if ${ac_cv_lib_rt_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char  ();
-int
-main ()
-{
-return  ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_=yes
-else
-  ac_cv_lib_rt_=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_" >&5
-$as_echo "$ac_cv_lib_rt_" >&6; }
-if test "x$ac_cv_lib_rt_" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
-
-  LIBS="-lrt $LIBS"
-
-fi
-
-if test "$ac_cv_lib_rt" = yes; then
-  NEED_LIBS="${NEED_LIBS} -lrt"
-fi
-
 NEED_LIBSG="${NEED_LIBS} -lpthread"
 
 if test "$ac_cv_sizeof_voidp" != 4; then
diff --git a/Singular/configure.in b/Singular/configure.in
index c190733..85ec3db 100644
--- a/Singular/configure.in
+++ b/Singular/configure.in
@@ -799,8 +799,10 @@ dnl
 if test "$ac_cv_singuname" != ix86-Win; then
 AC_CHECK_LIB(m, atof)
 fi
-AC_CHECK_LIB(nsl)
-AC_CHECK_LIB(socket)
+AC_CHECK_LIB(nsl,gethostbyname)
+AC_CHECK_LIB(socket,accept)
+AC_CHECK_LIB(rt,sem_open)
+
 SAVE_LIBS=${LIBS}
 LIBS=
 
@@ -1438,11 +1440,6 @@ else
   AC_MSG_RESULT(no)
 fi
 
-AC_CHECK_LIB(rt)
-if test "$ac_cv_lib_rt" = yes; then
-  NEED_LIBS="${NEED_LIBS} -lrt"
-fi
-
 NEED_LIBSG="${NEED_LIBS} -lpthread"
 
 if test "$ac_cv_sizeof_voidp" != 4; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/singular.git



More information about the debian-science-commits mailing list