Author: rfm
Date: Wed Sep 16 15:21:21 2015
New Revision: 38990

URL: http://svn.gna.org/viewcvs/gnustep?rev=38990&view=rev
Log:
fixup config test for older clang

Modified:
    libs/base/trunk/ChangeLog
    libs/base/trunk/configure
    libs/base/trunk/configure.ac

Modified: libs/base/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=38990&r1=38989&r2=38990&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog   (original)
+++ libs/base/trunk/ChangeLog   Wed Sep 16 15:21:21 2015
@@ -1,8 +1,15 @@
+2015-09-16  Richard Frith-Macdonald <[email protected]>
+
+       * configure.ac: fix check for pthread setname to work with older
+       versions of clang which object to autoconf checking for the
+       existence of a function by calling it without args.
+
 2015-09-16 Riccardo Mottola <[email protected]>
 
        * Headers/Foundation/NSFileManager.h
        * Source/NSFileManager.m
-       Add simple (files only and no keys handling) implementation of 10.6 
method contentsOfDirectoryAtURL.
+       Add simple (files only and no keys handling) implementation
+       of 10.6 method contentsOfDirectoryAtURL.
 
 2015-09-08 Niels Grewe <[email protected]>
 
@@ -10,8 +17,8 @@
 
 2015-09-04 Niels Grewe <[email protected]>
 
-       * Source/GSString.m: Optimisation for formatting strings that are 
stored as
-       UTF-16 (use memcpy instead of looping over the characters).
+       * Source/GSString.m: Optimisation for formatting strings that are
+       stored as UTF-16 (use memcpy instead of looping over the characters).
        * Tests/base/NSString/unichar_format.m: Test cases for formatting.
 
 2015-09-01 Niels Grewe <[email protected]>

Modified: libs/base/trunk/configure
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/configure?rev=38990&r1=38989&r2=38990&view=diff
==============================================================================
--- libs/base/trunk/configure   (original)
+++ libs/base/trunk/configure   Wed Sep 16 15:21:21 2015
@@ -2753,8 +2753,8 @@
   export CPPFLAGS
 else
   if test "$CPPFLAGS" != "$MAKECPPFLAGS"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running 
configure with the link options ($CPPFLAGS) set to a different value from that 
used by gnustep-make ($MAKECPPFLAGS).  To avoid conflicts/problems, 
reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the 
gnustep-base configure again with your CPPFLAGS environment variable set to 
$MAKECPPFLAGS" >&5
-$as_echo "$as_me: WARNING: You are running configure with the link options 
($CPPFLAGS) set to a different value from that used by gnustep-make 
($MAKECPPFLAGS).  To avoid conflicts/problems, reconfigure/reinstall 
gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again 
with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running 
configure with the preprocessor options ($CPPFLAGS) set to a different value 
from that used by gnustep-make ($MAKECPPFLAGS).  To avoid conflicts/problems, 
reconfigure/reinstall gnustep-make to use CPPFLAGS=$CPPFLAGS or run the 
gnustep-base configure again with your CPPFLAGS environment variable set to 
$MAKECPPFLAGS" >&5
+$as_echo "$as_me: WARNING: You are running configure with the preprocessor 
options ($CPPFLAGS) set to a different value from that used by gnustep-make 
($MAKECPPFLAGS).  To avoid conflicts/problems, reconfigure/reinstall 
gnustep-make to use CPPFLAGS=$CPPFLAGS or run the gnustep-base configure again 
with your CPPFLAGS environment variable set to $MAKECPPFLAGS" >&2;}
   fi
 fi
 
@@ -7612,24 +7612,8 @@
 # Check if we can name pthreads
 #--------------------------------------------------------------------
 
-for ac_func in pthread_set_name_np
-do :
-  ac_fn_c_check_func "$LINENO" "pthread_set_name_np" 
"ac_cv_func_pthread_set_name_np"
-if test "x$ac_cv_func_pthread_set_name_np" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_SET_NAME_NP 1
-_ACEOF
-
-fi
-done
-
-if test $ac_cv_func_pthread_set_name_np = yes; then
-
-$as_echo "#define PTHREAD_SETNAME(a) (pthread_set_name_np(pthread_self(), a), 
0)" >>confdefs.h
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np() 
variant" >&5
-$as_echo_n "checking for pthread_setname_np() variant... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np()" >&5
+$as_echo_n "checking for pthread_setname_np()... " >&6; }
 if ${gs_cv_pthread_setname_np+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -7688,24 +7672,23 @@
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gs_cv_pthread_setname_np" >&5
 $as_echo "$gs_cv_pthread_setname_np" >&6; }
-  case $gs_cv_pthread_setname_np in
-    darwin)
+case $gs_cv_pthread_setname_np in
+  darwin)
 
 $as_echo "#define PTHREAD_SETNAME(a) pthread_setname_np(a)" >>confdefs.h
 
-      ;;
-    glibc)
+    ;;
+  glibc)
 
 $as_echo "#define PTHREAD_SETNAME(a) pthread_setname_np(pthread_self(),a)" 
>>confdefs.h
 
-      ;;
-    netbsd)
+    ;;
+  netbsd)
 
 $as_echo "#define PTHREAD_SETNAME(a) 
pthread_setname_np(pthread_self(),\"%s\",a)" >>confdefs.h
 
-      ;;
-  esac
-fi
+    ;;
+esac
 
 #--------------------------------------------------------------------
 # Check whether we can get the system thread ID

Modified: libs/base/trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/configure.ac?rev=38990&r1=38989&r2=38990&view=diff
==============================================================================
--- libs/base/trunk/configure.ac        (original)
+++ libs/base/trunk/configure.ac        Wed Sep 16 15:21:21 2015
@@ -1801,42 +1801,34 @@
 # Check if we can name pthreads
 #--------------------------------------------------------------------
 
-AC_CHECK_FUNCS(pthread_set_name_np)
-if test $ac_cv_func_pthread_set_name_np = yes; then
-  AC_DEFINE(PTHREAD_SETNAME(a), (pthread_set_name_np(pthread_self(), a), 0),
-    [Description: Define set name function for pthread returning void])
-else
-  AC_CACHE_CHECK(
-    [for pthread_setname_np() variant],
-    [gs_cv_pthread_setname_np],
+AC_CACHE_CHECK([for pthread_setname_np()], gs_cv_pthread_setname_np,
+[AC_LINK_IFELSE(
+  [AC_LANG_PROGRAM([#include <pthread.h>],
+    [pthread_setname_np("name");])],
+  [gs_cv_pthread_setname_np=darwin],
+  [AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([#include <pthread.h>],
+      [pthread_setname_np(pthread_self(), "name");])],
+    [gs_cv_pthread_setname_np=glibc],
     [AC_LINK_IFELSE(
       [AC_LANG_PROGRAM([#include <pthread.h>],
-        [pthread_setname_np("name");])],
-      [gs_cv_pthread_setname_np=darwin],
-      [AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM([#include <pthread.h>],
-         [pthread_setname_np(pthread_self(), "name");])],
-       [gs_cv_pthread_setname_np=glibc],
-       [AC_LINK_IFELSE(
-         [AC_LANG_PROGRAM([#include <pthread.h>],
-           [pthread_setname_np(pthread_self(), "%s", "name");])],
-         [gs_cv_pthread_setname_np=netbsd],
-         [gs_cv_pthread_setname_np=none])])])])
-  case $gs_cv_pthread_setname_np in
-    darwin)
-      AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(a),
-        [Description: Define set name function for pthread with one arg])
-      ;;
-    glibc)
-      AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),a),
-        [Description: Define setname function for pthread with two args])
-      ;;
-    netbsd)
-      AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),"%s",a),
-        [Description: Define setname function for pthread with three args])
-      ;;
-  esac
-fi
+        [pthread_setname_np(pthread_self(), "%s", "name");])],
+      [gs_cv_pthread_setname_np=netbsd],
+      [gs_cv_pthread_setname_np=none])])])])
+case $gs_cv_pthread_setname_np in
+  darwin)
+    AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(a),
+      [Description: Define set name function for pthread with one arg])
+    ;;
+  glibc)
+    AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),a),
+      [Description: Define setname function for pthread with two args])
+    ;;
+  netbsd)
+    AC_DEFINE(PTHREAD_SETNAME(a), pthread_setname_np(pthread_self(),"%s",a),
+      [Description: Define setname function for pthread with three args])
+    ;;
+esac
 
 #--------------------------------------------------------------------
 # Check whether we can get the system thread ID


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to