Author: rfm
Date: Sun Aug 16 12:07:45 2015
New Revision: 38887

URL: http://svn.gna.org/viewcvs/gnustep?rev=38887&view=rev
Log:
autoconf updates

Modified:
    tools/make/trunk/ChangeLog
    tools/make/trunk/configure
    tools/make/trunk/configure.ac
    tools/make/trunk/library-combo.make

Modified: tools/make/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/ChangeLog?rev=38887&r1=38886&r2=38887&view=diff
==============================================================================
--- tools/make/trunk/ChangeLog  (original)
+++ tools/make/trunk/ChangeLog  Sun Aug 16 12:07:45 2015
@@ -1,3 +1,10 @@
+2015-08-16 Richard Frith-Macdonald <[email protected]>
+
+       * library-combo.make: Use David's suggested runtime flag for the
+       next generation (ng) runtime combo.
+       * configure.ac: Check for compiler blocks support for ng combo.
+       Fix some program source quoting for newer autoconf
+
 2015-08-08  Germán Arias <[email protected]>
 
        * Documentation/README.MinGW: Add instructions to install aspell and

Modified: tools/make/trunk/configure
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/configure?rev=38887&r1=38886&r2=38887&view=diff
==============================================================================
--- tools/make/trunk/configure  (original)
+++ tools/make/trunk/configure  Sun Aug 16 12:07:45 2015
@@ -3795,6 +3795,7 @@
 case "$ac_cv_library_combo" in
   apple) ac_cv_library_combo=apple-apple-apple ;;
   gnu)   ac_cv_library_combo=gnu-gnu-gnu ;;
+  ng)    ac_cv_library_combo=ng-gnu-gnu ;;
   nx)    ac_cv_library_combo=nx-nx-nx ;;
 esac
 
@@ -3864,13 +3865,21 @@
 if test "$MINGW32" = yes; then
   echo "hosted on mingw32 .."
   export SHELL=sh
-  export CC=${CC:-gcc}
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    export CC=${CC:-clang}
+  else
+    export CC=${CC:-gcc}
+  fi
   export AR=${AR:-ar}
   export RANLIB=${RANLIB:-ranlib}
   export DLLTOOL=${DLLTOOL:-dlltool}
 elif test "$CYGWIN" = yes; then
   echo "hosted on cygwin .."
-  export CC=${CC:-gcc}
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    export CC=${CC:-clang}
+  else
+    export CC=${CC:-gcc}
+  fi
   export AR=${AR:-ar}
   export RANLIB=${RANLIB:-ranlib}
   export DLLTOOL=${DLLTOOL:-dlltool}
@@ -3882,7 +3891,47 @@
 if test "x$target" != "x$host"; then
   echo "cross compiling from $host to $target .."
   cross_compiling="yes"
-  # Extract the first word of ""${targetArgument}-gcc"", so it can be a 
program name with args.
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    # Extract the first word of ""${targetArgument}-clang"", so it can be a 
program name with args.
+set dummy "${targetArgument}-clang"; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="                         "${targetArgument}-clang""
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="clang"
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    # Extract the first word of ""${targetArgument}-gcc"", so it can be a 
program name with args.
 set dummy "${targetArgument}-gcc"; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -3920,6 +3969,7 @@
 fi
 
 
+  fi
   # Extract the first word of ""${targetArgument}-ranlib"", so it can be a 
program name with args.
 set dummy "${targetArgument}-ranlib"; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -4035,6 +4085,52 @@
 
 
 else
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    #
+    # Detect compiler support for Blocks; perhaps someday -fblocks won't be
+    # required, in which case we'll need to change this.
+    #
+    saveCFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -fblocks"
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+(void)^{int i; i = 0; }();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      ac_cv_blocks="yes"
+
+else
+
+      ac_cv_blocks="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$saveCFLAGS"
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+    if test "$ac_cv_blocks" = no; then
+      as_fn_error $? "Your compiler doesn't appear to support blocks. To fix 
this use the CC environment varibale to specify a different compiler (or use a 
different library-combo)" "$LINENO" 5;
+    fi
+  fi
   # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5505,8 +5601,7 @@
 $as_echo_n "checking whether objc has thread support... " >&6; }
 if test "$OBJC_THREAD" != ""; then
   LIBS="$OBJCRT $LIBS $OBJC_THREAD"
-
-if test "$cross_compiling" = yes; then :
+  if test "$cross_compiling" = yes; then :
   objc_threaded=""
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5806,6 +5901,10 @@
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
 
 @interface     ObjCClass
 {
@@ -5824,6 +5923,9 @@
   return 0;
 }
 
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
   objcc=yes
@@ -5873,6 +5975,10 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
 /* Note that we never execute this code so it does not really matter
    what it is.  We are testing that the compiler accepts the
    '-fobjc-nonfragile-abi' flag.  */
@@ -5885,6 +5991,9 @@
 return __has_feature(objc_nonfragile_abi) ? 0 : 1;
 }
 
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
   USE_NONFRAGILE_ABI=yes
@@ -6052,6 +6161,10 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
 #include <objc/objc.h>
 @interface Test { id isa; } @end
 
@@ -6069,6 +6182,9 @@
   return 0;
 }
 
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
   USE_OBJC_EXCEPTIONS=yes

Modified: tools/make/trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/configure.ac?rev=38887&r1=38886&r2=38887&view=diff
==============================================================================
--- tools/make/trunk/configure.ac       (original)
+++ tools/make/trunk/configure.ac       Sun Aug 16 12:07:45 2015
@@ -124,6 +124,7 @@
 case "$ac_cv_library_combo" in
   apple) ac_cv_library_combo=apple-apple-apple ;;
   gnu)   ac_cv_library_combo=gnu-gnu-gnu ;;
+  ng)    ac_cv_library_combo=ng-gnu-gnu ;;
   nx)    ac_cv_library_combo=nx-nx-nx ;;
 esac
 
@@ -190,13 +191,21 @@
 if test "$MINGW32" = yes; then
   echo "hosted on mingw32 .."
   export SHELL=sh
-  export CC=${CC:-gcc}
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    export CC=${CC:-clang}
+  else
+    export CC=${CC:-gcc}
+  fi
   export AR=${AR:-ar}
   export RANLIB=${RANLIB:-ranlib}
   export DLLTOOL=${DLLTOOL:-dlltool}
 elif test "$CYGWIN" = yes; then
   echo "hosted on cygwin .."
-  export CC=${CC:-gcc}
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    export CC=${CC:-clang}
+  else
+    export CC=${CC:-gcc}
+  fi
   export AR=${AR:-ar}
   export RANLIB=${RANLIB:-ranlib}
   export DLLTOOL=${DLLTOOL:-dlltool}
@@ -208,8 +217,13 @@
 if test "x$target" != "x$host"; then
   echo "cross compiling from $host to $target .."
   cross_compiling="yes"
-  AC_CHECK_PROG(CC,      "${targetArgument}-gcc",     dnl
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    AC_CHECK_PROG(CC,    "${targetArgument}-clang",   dnl
+                         "${targetArgument}-clang",   clang)
+  else
+    AC_CHECK_PROG(CC,    "${targetArgument}-gcc",     dnl
                          "${targetArgument}-gcc",     gcc)
+  fi
   AC_CHECK_PROG(RANLIB,  "${targetArgument}-ranlib",  dnl
                          "${targetArgument}-ranlib",  ranlib)
   AC_CHECK_PROG(AR,      "${targetArgument}-ar",      dnl
@@ -217,6 +231,25 @@
   AC_CHECK_PROG(DLLTOOL, "${targetArgument}-dlltool", dnl
                          "${targetArgument}-dlltool", dlltool)
 else
+  if test "$OBJC_RUNTIME_LIB" = ng; then
+    #
+    # Detect compiler support for Blocks; perhaps someday -fblocks won't be
+    # required, in which case we'll need to change this.
+    #
+    saveCFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -fblocks"
+    AC_LANG_PUSH(C)
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[(void)^{int i; i = 0; }();])], [
+      ac_cv_blocks="yes"
+    ], [
+      ac_cv_blocks="no"
+    ])
+    CFLAGS="$saveCFLAGS"
+    AC_LANG_POP(C)
+    if test "$ac_cv_blocks" = no; then
+      AC_MSG_ERROR([Your compiler doesn't appear to support blocks. To fix 
this use the CC environment varibale to specify a different compiler (or use a 
different library-combo)]);
+    fi
+  fi
   AC_CHECK_PROG(AR,      ar,      ar)
   AC_CHECK_PROG(DLLTOOL, dlltool, dlltool)
   AC_PROG_RANLIB
@@ -1336,7 +1369,7 @@
 CXXPPFLAGS_saved="$CXXPPFLAGS"
 CXXPPFLAGS="$CXXPPFLAGS -x objective-c++"
 
-AC_COMPILE_IFELSE([[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[
 
 @interface     ObjCClass
 {
@@ -1354,7 +1387,7 @@
 {
   return 0;
 }
-]], objcc=yes, objcc=no)
+])], objcc=yes, objcc=no)
 AC_MSG_RESULT($objcc)
 if test x"$objcc" = x"no"; then
   OBJCXX=
@@ -1387,7 +1420,7 @@
   # something with -fobjc-nonfragile-abi.
   CFLAGS_no_nonfragile="$CFLAGS"
   CFLAGS="$CFLAGS -fobjc-nonfragile-abi"
-  AC_COMPILE_IFELSE([[
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[
 /* Note that we never execute this code so it does not really matter
    what it is.  We are testing that the compiler accepts the
    '-fobjc-nonfragile-abi' flag.  */
@@ -1399,7 +1432,7 @@
 #endif
 return __has_feature(objc_nonfragile_abi) ? 0 : 1;
 }
-]], USE_NONFRAGILE_ABI=yes, USE_NONFRAGILE_ABI=no)
+])], USE_NONFRAGILE_ABI=yes, USE_NONFRAGILE_ABI=no)
   AC_MSG_RESULT($USE_NONFRAGILE_ABI)
   CFLAGS="$CFLAGS_no_nonfragile"
 
@@ -1536,7 +1569,7 @@
   # something with @try/@catch/@finally in it.
   CFLAGS_no_exceptions="$CFLAGS"
   CFLAGS="$CFLAGS -fexceptions -fobjc-exceptions"
-  AC_COMPILE_IFELSE([[
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[
 #include <objc/objc.h>
 @interface Test { id isa; } @end
 
@@ -1553,7 +1586,7 @@
     }
   return 0;
 }
-  ]], USE_OBJC_EXCEPTIONS=yes, USE_OBJC_EXCEPTIONS=no)
+  ])], USE_OBJC_EXCEPTIONS=yes, USE_OBJC_EXCEPTIONS=no)
     if test x"$USE_OBJC_EXCEPTIONS" = x"no"; then
       AC_MSG_RESULT(no)
     else

Modified: tools/make/trunk/library-combo.make
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/library-combo.make?rev=38887&r1=38886&r2=38887&view=diff
==============================================================================
--- tools/make/trunk/library-combo.make (original)
+++ tools/make/trunk/library-combo.make Sun Aug 16 12:07:45 2015
@@ -108,8 +108,8 @@
   OBJC_LDFLAGS =
   OBJC_LIB_DIR =
   OBJC_LIBS = $(OBJC_LIB_FLAG) -fobjc-nonfragile-abi
-  RUNTIME_FLAG   = -fobjc-runtime=gnustep -fblocks -fno-objc-legacy-dispatch
-  RUNTIME_DEFINE = -DGNU_RUNTIME=1 -D_NONFRAGILE_ABI=1
+  RUNTIME_FLAG = -fobjc-runtime=gnustep-1.8 -fblocks -fno-objc-legacy-dispatch
+  RUNTIME_DEFINE = -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1
 endif
 
 ifeq ($(OBJC_RUNTIME_LIB), gnugc)


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

Reply via email to