libcvd-members
[Top][All Lists]
Advanced

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

[libcvd-members] gvars3 configure configure.ac


From: Edward Rosten
Subject: [libcvd-members] gvars3 configure configure.ac
Date: Wed, 18 Feb 2009 17:43:59 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    gvars3
Changes by:     Edward Rosten <edrosten>        09/02/18 17:43:58

Modified files:
        .              : configure configure.ac 

Log message:
        Simpler checking for -pthread.
        
        The whole thing isn't thread safe anyway...

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gvars3/configure?cvsroot=libcvd&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gvars3/configure.ac?cvsroot=libcvd&r1=1.18&r2=1.19

Patches:
Index: configure
===================================================================
RCS file: /cvsroot/libcvd/gvars3/configure,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- configure   21 Aug 2008 14:15:22 -0000      1.19
+++ configure   18 Feb 2009 17:43:58 -0000      1.20
@@ -3573,15 +3573,22 @@
    { (exit 1); exit 1; }; }
 fi
 
-{ echo "$as_me:$LINENO: checking for working pthreads" >&5
-echo $ECHO_N "checking for working pthreads... $ECHO_C" >&6; }
-CPPFLAGS="$CPPFLAGS -pthread"
-LIBS="$LIBS -pthread"
-a=0
-cat >conftest.$ac_ext <<_ACEOF
-#include <pthread.h>
-                                       void*foo(void*){}
-                                       int 
main(){pthread_create(0,0,foo,0);return 0;}
+
+       if test "" == ""
+       then
+               { echo "$as_me:$LINENO: checking if compiler flag -pthread 
works" >&5
+echo $ECHO_N "checking if compiler flag -pthread works... $ECHO_C" >&6; }
+       else
+               { echo "$as_me:$LINENO: checking " >&5
+echo $ECHO_N "checking ... $ECHO_C" >&6; }
+       fi
+       save_CXXFLAGS="$CXXFLAGS"
+       CXXFLAGS="$CXXFLAGS -pthread"
+
+
+
+       cat >conftest.$ac_ext <<_ACEOF
+int main(){}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -3600,28 +3607,31 @@
         test -z "$ac_cxx_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  a=1
+  cvd_conf_test=1
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+       cvd_conf_test=0
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-LIBS="$LIBS -pthread"
-if test $a == 0
-then
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       { { echo "$as_me:$LINENO: error: pthread is not optional. It should be. 
Sorry." >&5
-echo "$as_me: error: pthread is not optional. It should be. Sorry." >&2;}
-   { (exit 1); exit 1; }; }
-else
+
+
+
+
+
+       if test $cvd_conf_test = 1
+       then
        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
-fi
-
+               ts_success=yes
+       else
+               { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+               CXXFLAGS="$save_CXXFLAGS"
+               ts_success=no
+       fi
 
 
 HLIBS="$LIBS"

Index: configure.ac
===================================================================
RCS file: /cvsroot/libcvd/gvars3/configure.ac,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- configure.ac        21 Aug 2008 14:15:23 -0000      1.18
+++ configure.ac        18 Feb 2009 17:43:58 -0000      1.19
@@ -153,23 +153,7 @@
        AC_MSG_ERROR(TooN is required. Visit savannah.nongnu.org/projects/toon)
 fi
 
-AC_MSG_CHECKING(for working pthreads)
-CPPFLAGS="$CPPFLAGS -pthread"
-LIBS="$LIBS -pthread"
-a=0
-AC_COMPILE_IFELSE([#include <pthread.h>
-                                       void*foo(void*){}
-                                       int 
main(){pthread_create(0,0,foo,0);return 0;}],[a=1])
-LIBS="$LIBS -pthread"
-if test $a == 0
-then
-       AC_MSG_RESULT(no)
-       AC_MSG_ERROR(pthread is not optional. It should be. Sorry.)
-else
-       AC_MSG_RESULT(yes)
-fi
-
-
+TEST_AND_SET_CXXFLAG(-pthread)
 
 HLIBS="$LIBS"
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]