[26175] branches/dp2mp-move/base
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 15 01:06:03 PDT 2007
Revision: 26175
http://trac.macosforge.org/projects/macports/changeset/26175
Author: jmpp at macports.org
Date: 2007-06-15 01:06:03 -0700 (Fri, 15 Jun 2007)
Log Message:
-----------
Merging landonf's r26135: Autoconf support for objc, foundation, and optionally-enabled -Werror.
Modified Paths:
--------------
branches/dp2mp-move/base/Mk/macports.autoconf.mk.in
branches/dp2mp-move/base/aclocal.m4
branches/dp2mp-move/base/configure
branches/dp2mp-move/base/configure.ac
branches/dp2mp-move/base/src/config.h.in
Added Paths:
-----------
branches/dp2mp-move/base/foundation.m4
branches/dp2mp-move/base/objc.m4
Modified: branches/dp2mp-move/base/Mk/macports.autoconf.mk.in
===================================================================
--- branches/dp2mp-move/base/Mk/macports.autoconf.mk.in 2007-06-15 07:30:36 UTC (rev 26174)
+++ branches/dp2mp-move/base/Mk/macports.autoconf.mk.in 2007-06-15 08:06:03 UTC (rev 26175)
@@ -5,15 +5,21 @@
VPATH = @srcdir@
CC = @CC@
-CFLAGS = @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) $(CPPFLAGS) $(CFLAGS_LIBCURL)
+CFLAGS = @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR) $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) $(CPPFLAGS) $(CFLAGS_LIBCURL)
+OBJCFLAGS = @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR) ${CFLAGS_DEBUG} $(CFLAGS_OPTIMIZE) $(CPPFLAGS) $(CFLAGS_LIBCURL)
CPPFLAGS = @CPPFLAGS@ @DEFS@ @INCLUDES@ @TCL_INCLUDES@
TCL_DEFS = @TCL_DEFS@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
CFLAGS_DEBUG = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
CFLAGS_QUICHEEATERS = @CFLAGS_QUICHEEATERS@
+CFLAGS_WERROR = @CFLAGS_WERROR@
CFLAGS_LIBCURL = @CFLAGS_LIBCURL@
+OBJC_RUNTIME = @OBJC_RUNTIME@
+OBJC_RUNTIME_FLAGS = @OBJC_RUNTIME_FLAGS@
+OBJC_LIBS = @OBJC_LIBS@
+
TCL_CC = @TCL_CC@
SHLIB_LD = @SHLIB_LD@
LDFLAGS_LIBCURL = @LDFLAGS_LIBCURL@
Modified: branches/dp2mp-move/base/aclocal.m4
===================================================================
--- branches/dp2mp-move/base/aclocal.m4 2007-06-15 07:30:36 UTC (rev 26174)
+++ branches/dp2mp-move/base/aclocal.m4 2007-06-15 08:06:03 UTC (rev 26175)
@@ -1,4 +1,6 @@
builtin(include,tcl.m4)
+builtin(include,objc.m4)
+builtin(include,foundation.m4)
#------------------------------------------------------------------------
# MP_CHECK_FRAMEWORK_COREFOUNDATION --
@@ -835,3 +837,31 @@
AC_SUBST(READLINK_IS_NOT_P1003_1A)
])
+
+#------------------------------------------------------------------------
+# MP_WERROR --
+#
+# Enable -Werror
+#
+# Arguments:
+# None.
+#
+# Requires:
+# none
+#
+# Depends:
+# none
+#
+# Results:
+# Substitutes WERROR_CFLAGS variable
+#------------------------------------------------------------------------
+AC_DEFUN([MP_WERROR],[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_ARG_ENABLE(werror, AC_HELP_STRING([--enable-werror], [Add -Werror to CFLAGS. Used for development.]), [enable_werror=${enableval}], [enable_werror=no])
+ if test x"$enable_werror" != "xno"; then
+ CFLAGS_WERROR="-Werror"
+ else
+ CFLAGS_WERROR=""
+ fi
+ AC_SUBST([CFLAGS_WERROR])
+])
Modified: branches/dp2mp-move/base/configure
===================================================================
--- branches/dp2mp-move/base/configure 2007-06-15 07:30:36 UTC (rev 26174)
+++ branches/dp2mp-move/base/configure 2007-06-15 08:06:03 UTC (rev 26175)
@@ -579,7 +579,6 @@
PACKAGE_BUGREPORT='macports-dev at lists.macosforge.org'
ac_unique_file="src/pextlib1.0/Pextlib.c"
-ac_default_prefix=/opt/local
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -616,6 +615,7 @@
# include <unistd.h>
#endif"
+ac_default_prefix=/opt/local
ac_subst_vars='SHELL
PATH_SEPARATOR
PACKAGE_NAME
@@ -672,6 +672,9 @@
ac_ct_CC
EXEEXT
OBJEXT
+OBJC
+OBJCFLAGS
+ac_ct_OBJC
INSTALL_PROGRAM
INSTALL_SCRIPT
INSTALL_DATA
@@ -691,6 +694,15 @@
GNUTAR
TAR_CMD
CFLAGS_QUICHEEATERS
+CFLAGS_WERROR
+OBJCPP
+GREP
+EGREP
+OBJC_RUNTIME
+OBJC_RUNTIME_FLAGS
+OBJC_LIBS
+OBJC_PTHREAD_LIBS
+OBJC_PTHREAD_CFLAGS
HAVE_FRAMEWORK_COREFOUNDATION
HAVE_FRAMEWORK_SYSTEMCONFIGURATION
HAVE_FRAMEWORK_IOKIT
@@ -703,8 +715,6 @@
DSTGRP
DSTMODE
CPP
-GREP
-EGREP
READLINK_IS_NOT_P1003_1A
MD5_LIBS
XMKMF
@@ -755,6 +765,8 @@
LDFLAGS
LIBS
CPPFLAGS
+OBJC
+OBJCFLAGS
MTREE
CVS
SVN
@@ -764,6 +776,7 @@
BZIP2
XAR
OPEN
+OBJCPP
CPP
XMKMF'
ac_subdirs_all='src/thread2.6
@@ -1346,11 +1359,14 @@
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-werror Add -Werror to CFLAGS. Used for development.
--enable-shared build and link with shared libraries --enable-shared
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-objc-runtime Specify either "GNU" or "apple"
+ --with-objc-foundation Specify either "GNUstep" or "apple"
--with-ports-dir=DIR Specify alternate ports directory
--with-install-user=USER
Specify user ownership of installed files
@@ -1376,6 +1392,8 @@
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
+ OBJC Objective C compiler command
+ OBJCFLAGS Objective C compiler flags
MTREE path to mtree command
CVS path to cvs command
SVN path to svn command
@@ -1385,6 +1403,7 @@
BZIP2 path to bzip2 command
XAR path to xar command
OPEN path to open command
+ OBJCPP Objective C preprocessor
CPP C preprocessor
XMKMF Path to xmkmf, Makefile generator for X Window System
@@ -2925,6 +2944,264 @@
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC gcc cc objc
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_OBJC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$OBJC"; then
+ ac_cv_prog_OBJC="$OBJC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJC=$ac_cv_prog_OBJC
+if test -n "$OBJC"; then
+ { echo "$as_me:$LINENO: result: $OBJC" >&5
+echo "${ECHO_T}$OBJC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$OBJC" && break
+ done
+fi
+if test -z "$OBJC"; then
+ ac_ct_OBJC=$OBJC
+ for ac_prog in $CCC gcc cc objc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_OBJC"; then
+ ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
+if test -n "$ac_ct_OBJC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_OBJC" >&5
+echo "${ECHO_T}$ac_ct_OBJC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_OBJC" && break
+done
+
+ if test "x$ac_ct_OBJC" = x; then
+ OBJC="gcc"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJC=$ac_ct_OBJC
+ fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for Objective C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU Objective C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Objective C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_objc_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_objc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objc_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_objc_compiler_gnu" >&6; }
+GOBJC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_OBJCFLAGS=${OBJCFLAGS+set}
+ac_save_OBJCFLAGS=$OBJCFLAGS
+OBJCFLAGS="-g"
+{ echo "$as_me:$LINENO: checking whether $OBJC accepts -g" >&5
+echo $ECHO_N "checking whether $OBJC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_objc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_objc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_prog_objc_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_objc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_objc_g" >&6; }
+if test "$ac_test_OBJCFLAGS" = set; then
+ OBJCFLAGS=$ac_save_OBJCFLAGS
+elif test $ac_cv_prog_objc_g = yes; then
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-g -O2"
+ else
+ OBJCFLAGS="-g"
+ fi
+else
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-O2"
+ else
+ OBJCFLAGS=
+ fi
+fi
+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
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -3569,7 +3846,23 @@
+ # Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then
+ enableval=$enable_werror; enable_werror=${enableval}
+else
+ enable_werror=no
+fi
+ if test x"$enable_werror" != "xno"; then
+ CFLAGS_WERROR="-Werror"
+ else
+ CFLAGS_WERROR=""
+ fi
+
+
+
+
+
{ echo "$as_me:$LINENO: checking how to mark unused variables" >&5
echo $ECHO_N "checking how to mark unused variables... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
@@ -3619,7 +3912,1516 @@
+ { echo "$as_me:$LINENO: checking for gcc symbol visibility attribute" >&5
+echo $ECHO_N "checking for gcc symbol visibility attribute... $ECHO_C" >&6; }
+ if test "${mp_cv_attribute_mp_private+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #if defined(__GNUC__) && defined(__APPLE__) && __GNUC__ < 4
+ # error Darwin does not support the visibility attribute with gcc releases prior to 4
+ #elif defined(WIN32) && __GNUC__ < 4
+ # error MinGW/Cygwin do not support the visibility attribute with gcc releases prior to 4.
+ #endif
+ int a __attribute__ ((visibility("hidden")));
+
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ mp_cv_attribute_mp_private="__attribute__((visibility(\"hidden\")))"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ mp_cv_attribute_mp_private="no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+ { echo "$as_me:$LINENO: result: $mp_cv_attribute_mp_private" >&5
+echo "${ECHO_T}$mp_cv_attribute_mp_private" >&6; }
+
+ if test x"$mp_cv_attribute_mp_private" = "xno"; then
+ MP_PRIVATE=""
+ else
+ MP_PRIVATE="$mp_cv_attribute_mp_private"
+ fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define MP_PRIVATE $MP_PRIVATE
+_ACEOF
+
+
+
+# Foundation checks
+
+ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the Objective C preprocessor" >&5
+echo $ECHO_N "checking how to run the Objective C preprocessor... $ECHO_C" >&6; }
+if test -z "$OBJCPP"; then
+ if test "${ac_cv_prog_OBJCPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because OBJCPP needs to be expanded
+ for OBJCPP in "$OBJC -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_objc_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_objc_preproc_warn_flag$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_objc_preproc_warn_flag$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_OBJCPP=$OBJCPP
+
+fi
+ OBJCPP=$ac_cv_prog_OBJCPP
+else
+ ac_cv_prog_OBJCPP=$OBJCPP
+fi
+{ echo "$as_me:$LINENO: result: $OBJCPP" >&5
+echo "${ECHO_T}$OBJCPP" >&6; }
+ac_preproc_ok=false
+for ac_objc_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_objc_preproc_warn_flag$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_objc_preproc_warn_flag$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: Objective C preprocessor \"$OBJCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: Objective C preprocessor \"$OBJCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Check whether --with-objc-runtime was given.
+if test "${with_objc_runtime+set}" = set; then
+ withval=$with_objc_runtime; with_objc_runtime=${withval}
+fi
+
+
+ if test x"${with_objc_runtime}" != x; then
+ case "${with_objc_runtime}" in
+ GNU)
+ ;;
+ apple)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: ${with_objc_runtime} is not a valid argument to --with-objc-runtime. Please specify either \"GNU\" or \"apple\"" >&5
+echo "$as_me: error: ${with_objc_runtime} is not a valid argument to --with-objc-runtime. Please specify either \"GNU\" or \"apple\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ fi
+
+ ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+
+
+ # Check for common header, objc/objc.h
+
+for ac_header in objc/objc.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_objc_preproc_warn_flag$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_objc_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to macports-dev at lists.macosforge.org ##
+## ------------------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: Can't locate Objective C runtime headers" >&5
+echo "$as_me: error: Can't locate Objective C runtime headers" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+done
+
+
+ # Save LIBS & OBJCFLAGS
+ # depending on whether the cache is used,
+ # the variables may or may not be modified.
+ OLD_LIBS="${LIBS}"
+ OLD_OBJCFLAGS="${OBJCFLAGS}"
+
+ # Add -lobjc. The following tests will ensure that the library exists and functions with the detected Objective C compiler
+ LIBS="${LIBS} -lobjc"
+
+ # Test if pthreads are required to link against
+ # libobjc - this is the case on FreeBSD.
+
+ { echo "$as_me:$LINENO: checking if linking libobjc requires pthreads" >&5
+echo $ECHO_N "checking if linking libobjc requires pthreads... $ECHO_C" >&6; }
+ if test "${mp_cv_objc_req_pthread+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # First, test if objc links without pthreads
+ # The following uses quadrigraphs
+ # '[' = '['
+ # ']' = ']'
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <objc/objc.h>
+ #include <objc/Object.h>
+
+int
+main ()
+{
+
+ Object *obj = [Object alloc];
+ puts([obj name]);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ # Linked without -pthread
+ mp_cv_objc_req_pthread="no"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ # Failed to link without -pthread
+ mp_cv_objc_req_pthread="yes"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+ # If the above failed, try with pthreads
+ if test x"${mp_cv_objc_req_pthread}" = x"yes"; then
+ LIBS="${LIBS} ${PTHREAD_LIBS}"
+ OBJCFLAGS="${OBJCFLAGS} ${PTHREAD_CFLAGS}"
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <objc/objc.h>
+ #include <objc/Object.h>
+
+int
+main ()
+{
+
+ Object *obj = [Object alloc];
+ puts([obj name]);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ # Linked with -lpthread
+ mp_cv_objc_req_pthread="yes"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ # Failed to link against objc at all
+ # This will be caught in the runtime
+ # checks below
+ mp_cv_objc_req_pthread="no"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+
+fi
+
+ { echo "$as_me:$LINENO: result: ${mp_cv_objc_req_pthread}" >&5
+echo "${ECHO_T}${mp_cv_objc_req_pthread}" >&6; }
+
+ if test x"${mp_cv_objc_req_pthread}" = x"no"; then
+ OBJC_LIBS="-lobjc"
+ OBJC_PTHREAD_LIBS="${PTHREAD_LIBS}"
+ OBJC_PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
+ elif test x"${mp_cv_objc_req_pthread}" = x"yes"; then
+ OBJC_LIBS="-lobjc ${PTHREAD_LIBS}"
+ OBJCFLAGS="${OBJCFLAGS} ${PTHREAD_CFLAGS}"
+ fi
+
+ if test x"${with_objc_runtime}" = x || test x"${with_objc_runtime}" = x"apple"; then
+ { echo "$as_me:$LINENO: checking for Apple Objective-C runtime" >&5
+echo $ECHO_N "checking for Apple Objective-C runtime... $ECHO_C" >&6; }
+ if test "${mp_cv_objc_runtime_apple+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # The following uses quadrigraphs
+ # '[' = '['
+ # ']' = ']'
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <objc/objc.h>
+ #include <objc/objc-api.h>
+
+int
+main ()
+{
+
+ id class = objc_lookUpClass("Object");
+ id obj = [class alloc];
+ puts([obj name]);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ mp_cv_objc_runtime_apple="yes"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ mp_cv_objc_runtime_apple="no"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ { echo "$as_me:$LINENO: result: ${mp_cv_objc_runtime_apple}" >&5
+echo "${ECHO_T}${mp_cv_objc_runtime_apple}" >&6; }
+ else
+ mp_cv_objc_runtime_apple="no"
+ fi
+
+ if test x"${with_objc_runtime}" = x || test x"${with_objc_runtime}" = x"GNU"; then
+ { echo "$as_me:$LINENO: checking for GNU Objective C runtime" >&5
+echo $ECHO_N "checking for GNU Objective C runtime... $ECHO_C" >&6; }
+ if test "${mp_cv_objc_runtime_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # The following uses quadrigraphs
+ # '[' = '['
+ # ']' = ']'
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <objc/objc.h>
+ #include <objc/objc-api.h>
+
+int
+main ()
+{
+
+ id class = objc_lookup_class("Object");
+ id obj = [class alloc];
+ puts([obj name]);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ mp_cv_objc_runtime_gnu="yes"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ mp_cv_objc_runtime_gnu="no"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ { echo "$as_me:$LINENO: result: ${mp_cv_objc_runtime_gnu}" >&5
+echo "${ECHO_T}${mp_cv_objc_runtime_gnu}" >&6; }
+ else
+ mp_cv_objc_runtime_gnu="no"
+ fi
+
+ # Apple runtime is prefered
+ if test x"${mp_cv_objc_runtime_apple}" = x"yes"; then
+ OBJC_RUNTIME="APPLE_RUNTIME"
+ OBJC_RUNTIME_FLAGS="-fnext-runtime"
+ { echo "$as_me:$LINENO: Using Apple Objective-C runtime" >&5
+echo "$as_me: Using Apple Objective-C runtime" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define APPLE_RUNTIME 1
+_ACEOF
+
+ elif test x"${mp_cv_objc_runtime_gnu}" = x"yes"; then
+ OBJC_RUNTIME="GNU_RUNTIME"
+ OBJC_RUNTIME_FLAGS="-fgnu-runtime"
+ { echo "$as_me:$LINENO: Using GNU Objective-C runtime" >&5
+echo "$as_me: Using GNU Objective-C runtime" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define GNU_RUNTIME 1
+_ACEOF
+
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate a working Objective-C runtime.
+See \`config.log' for more details." >&5
+echo "$as_me: error: Could not locate a working Objective-C runtime.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # Restore LIBS & OBJCFLAGS
+ LIBS="${OLD_LIBS}"
+ OBJCFLAGS="${OLD_OBJCFLAGS}"
+
+
+
+
+
+
+
+
+ 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
+
+
+
+
+
+# Check whether --with-objc-foundation was given.
+if test "${with_objc_foundation+set}" = set; then
+ withval=$with_objc_foundation; with_objc_foundation=${withval}
+fi
+
+
+ if test x"${with_objc_foundation}" != x; then
+ case "${with_objc_foundation}" in
+ GNUstep)
+ ;;
+ GNU)
+ with_objc_foundation="GNUstep"
+ ;;
+ apple)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: ${with_objc_foundation} is not a valid argument to --with-objc-foundation. Please specify either \"GNU\" or \"apple\"" >&5
+echo "$as_me: error: ${with_objc_foundation} is not a valid argument to --with-objc-foundation. Please specify either \"GNU\" or \"apple\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ fi
+
+ ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+
+
+ if test x"${with_objc_foundation}" == x || test x"${with_objc_foundation}" == x"apple"; then
+ # '[' = '['
+ # ']' = ']'
+ { echo "$as_me:$LINENO: checking for Apple Foundation library" >&5
+echo $ECHO_N "checking for Apple Foundation library... $ECHO_C" >&6; }
+
+ # Set NeXT LIBS and CFLAGS
+ APPLE_FOUNDATION_CFLAGS="-framework Foundation"
+ APPLE_FOUNDATION_LIBS="-framework Foundation"
+
+ if test "${ac_cv_objc_foundation_apple+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # Save old LIBS and CFLAGS
+ LIBS_OLD="${LIBS}"
+ CFLAGS_OLD="${CFLAGS}"
+
+ CFLAGS="${APPLE_FOUNDATION_CFLAGS} ${CFLAGS}"
+ LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
+
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <Foundation/Foundation.h>
+
+int
+main ()
+{
+
+ NSString *string = [[NSString alloc] initWithCString: "Hello World"];
+ [NSString length];
+
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ ac_cv_objc_foundation_apple="yes"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ ac_cv_objc_foundation_apple="no"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ # Restore LIBS and CFLAGS
+ LIBS="${LIBS_OLD}"
+ CFLAGS="${CFLAGS_OLD}"
+
+fi
+
+ { echo "$as_me:$LINENO: result: ${ac_cv_objc_foundation_apple}" >&5
+echo "${ECHO_T}${ac_cv_objc_foundation_apple}" >&6; }
+ else
+ ac_cv_objc_foundation_apple="no"
+ fi
+
+ if test x"${with_objc_foundation}" == x || test x${with_objc_foundation} == x"GNUstep"; then
+ if test x"${GNUSTEP_SYSTEM_ROOT}" == x; then
+ if test x"${with_objc_foundation}" == x"GNUstep"; then
+ { { echo "$as_me:$LINENO: error: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library" >&5
+echo "$as_me: error: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library" >&5
+echo "$as_me: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library" >&2;}
+ fi
+ else
+
+ { echo "$as_me:$LINENO: checking for GNUstep Foundation library" >&5
+echo $ECHO_N "checking for GNUstep Foundation library... $ECHO_C" >&6; }
+
+ # Set GNUstep LDFLAGS, CPPFLAGS, and LIBS
+ GNUSTEP_LDFLAGS="-L${GNUSTEP_SYSTEM_ROOT}/Library/Libraries/"
+ GNUSTEP_CPPFLAGS="-I${GNUSTEP_SYSTEM_ROOT}/Library/Headers/"
+ GNUSTEP_LIBS="-lgnustep-base"
+
+ if test "${ac_cv_objc_foundation_gnustep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # Save old LDFLAGS, CPPFLAGS, and LIBS
+ LDFLAGS_OLD="${LDFLAGS}"
+ CPPFLAGS_OLD="${CPPFLAGS}"
+ LIBS_OLD="${LIBS}"
+
+ LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
+ CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
+ LIBS="${GNUSTEP_LIBS} ${LIBS}"
+
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <Foundation/Foundation.h>
+
+int
+main ()
+{
+
+ NSString *string = [[NSString alloc] initWithCString: "Hello World"];
+ [NSString length];
+
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ ac_cv_objc_foundation_gnustep="yes"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ ac_cv_objc_foundation_gnustep="no"
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ # Restore LDFLAGS, CPPFLAGS, and LIBS
+ LDFLAGS="${LDFLAGS_OLD}"
+ CPPFLAGS="${CPPFLAGS_OLD}"
+ LIBS="${LIBS_OLD}"
+
+fi
+
+ { echo "$as_me:$LINENO: result: ${ac_cv_objc_foundation_gnustep}" >&5
+echo "${ECHO_T}${ac_cv_objc_foundation_gnustep}" >&6; }
+ fi
+ else
+ ac_cv_objc_foundation_gnustep="no"
+ fi
+
+ # NeXT Foundation is prefered
+ if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
+ OBJC_FOUNDATION="Apple"
+ CPPFLAGS="${APPLE_FOUNDATION_CPPFLAGS} ${CPPFLAGS}"
+ LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
+
+cat >>confdefs.h <<\_ACEOF
+#define APPLE_FOUNDATION 1
+_ACEOF
+
+ { echo "$as_me:$LINENO: Using Apple Foundation library" >&5
+echo "$as_me: Using Apple Foundation library" >&6;}
+ elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
+ OBJC_FOUNDATION="GNUstep"
+ CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
+ LIBS="${GNUSTEP_LIBS} ${LIBS}"
+ LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
+
+cat >>confdefs.h <<\_ACEOF
+#define GNUSTEP_FOUNDATION 1
+_ACEOF
+
+ { echo "$as_me:$LINENO: Using GNUstep Foundation library" >&5
+echo "$as_me: Using GNUstep Foundation library" >&6;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not find a working Foundation implementation" >&5
+echo "$as_me: error: Could not find a working Foundation implementation" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ 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
+
+
+
+
FRAMEWORK_LIBS="-framework CoreFoundation"
{ echo "$as_me:$LINENO: checking for CoreFoundation framework" >&5
@@ -4358,168 +6160,6 @@
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
- $ac_path_GREP_found && break 3
- done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-else
- ac_cv_path_GREP=$GREP
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
- $ac_path_EGREP_found && break 3
- done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
-
- fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
@@ -5070,7 +6710,6 @@
fi
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
@@ -5080,79 +6719,11 @@
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-fi
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
for ac_header in limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h libgen.h sys/socket.h \
readline/readline.h readline/history.h pwd.h sys/paths.h
do
@@ -10364,6 +11935,9 @@
ac_ct_CC!$ac_ct_CC$ac_delim
EXEEXT!$EXEEXT$ac_delim
OBJEXT!$OBJEXT$ac_delim
+OBJC!$OBJC$ac_delim
+OBJCFLAGS!$OBJCFLAGS$ac_delim
+ac_ct_OBJC!$ac_ct_OBJC$ac_delim
INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
@@ -10383,6 +11957,15 @@
GNUTAR!$GNUTAR$ac_delim
TAR_CMD!$TAR_CMD$ac_delim
CFLAGS_QUICHEEATERS!$CFLAGS_QUICHEEATERS$ac_delim
+CFLAGS_WERROR!$CFLAGS_WERROR$ac_delim
+OBJCPP!$OBJCPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+OBJC_RUNTIME!$OBJC_RUNTIME$ac_delim
+OBJC_RUNTIME_FLAGS!$OBJC_RUNTIME_FLAGS$ac_delim
+OBJC_LIBS!$OBJC_LIBS$ac_delim
+OBJC_PTHREAD_LIBS!$OBJC_PTHREAD_LIBS$ac_delim
+OBJC_PTHREAD_CFLAGS!$OBJC_PTHREAD_CFLAGS$ac_delim
HAVE_FRAMEWORK_COREFOUNDATION!$HAVE_FRAMEWORK_COREFOUNDATION$ac_delim
HAVE_FRAMEWORK_SYSTEMCONFIGURATION!$HAVE_FRAMEWORK_SYSTEMCONFIGURATION$ac_delim
HAVE_FRAMEWORK_IOKIT!$HAVE_FRAMEWORK_IOKIT$ac_delim
@@ -10393,18 +11976,6 @@
MPCONFIGDIR!$MPCONFIGDIR$ac_delim
DSTUSR!$DSTUSR$ac_delim
DSTGRP!$DSTGRP$ac_delim
-DSTMODE!$DSTMODE$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-READLINK_IS_NOT_P1003_1A!$READLINK_IS_NOT_P1003_1A$ac_delim
-MD5_LIBS!$MD5_LIBS$ac_delim
-XMKMF!$XMKMF$ac_delim
-X_CFLAGS!$X_CFLAGS$ac_delim
-X_PRE_LIBS!$X_PRE_LIBS$ac_delim
-X_LIBS!$X_LIBS$ac_delim
-X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
-TCL_VERSION!$TCL_VERSION$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -10446,6 +12017,16 @@
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+DSTMODE!$DSTMODE$ac_delim
+CPP!$CPP$ac_delim
+READLINK_IS_NOT_P1003_1A!$READLINK_IS_NOT_P1003_1A$ac_delim
+MD5_LIBS!$MD5_LIBS$ac_delim
+XMKMF!$XMKMF$ac_delim
+X_CFLAGS!$X_CFLAGS$ac_delim
+X_PRE_LIBS!$X_PRE_LIBS$ac_delim
+X_LIBS!$X_LIBS$ac_delim
+X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
+TCL_VERSION!$TCL_VERSION$ac_delim
TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
@@ -10481,7 +12062,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 33; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 43; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: branches/dp2mp-move/base/configure.ac
===================================================================
--- branches/dp2mp-move/base/configure.ac 2007-06-15 07:30:36 UTC (rev 26174)
+++ branches/dp2mp-move/base/configure.ac 2007-06-15 08:06:03 UTC (rev 26175)
@@ -10,6 +10,7 @@
# Checks for programs.
AC_PROG_CC
+AC_PROG_OBJC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
@@ -42,9 +43,15 @@
CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
fi
AC_SUBST(CFLAGS_QUICHEEATERS)
+MP_WERROR
MP_COMPILER_ATTRIBUTE_UNUSED
+MP_COMPILER_ATTRIBUTE_LF_PRIVATE
+# Foundation checks
+MP_OBJC_RUNTIME
+MP_OBJC_FOUNDATION
+
MP_PROG_DAEMONDO
#MP_PROG_XAR
Added: branches/dp2mp-move/base/foundation.m4
===================================================================
--- branches/dp2mp-move/base/foundation.m4 (rev 0)
+++ branches/dp2mp-move/base/foundation.m4 2007-06-15 08:06:03 UTC (rev 26175)
@@ -0,0 +1,408 @@
+#------------------------------------------------------------------------
+# MP_COMPILER_ATTRIBUTE_LF_PRIVATE
+#
+# Determines whether the compiler supports the symbol
+# 'visibility("hidden")' attribute
+#
+# Arguments:
+# None.
+#
+# Requires:
+# none
+#
+# Depends:
+# none
+#
+# Results:
+#
+# Defines the following macros:
+# LF_PRIVATE
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN([MP_COMPILER_ATTRIBUTE_LF_PRIVATE], [
+ AC_MSG_CHECKING([for gcc symbol visibility attribute])
+ AC_CACHE_VAL(mp_cv_attribute_mp_private, [
+ AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([
+ #if defined(__GNUC__) && defined(__APPLE__) && __GNUC__ < 4
+ # error Darwin does not support the visibility attribute with gcc releases prior to 4
+ #elif defined(WIN32) && __GNUC__ < 4
+ # error MinGW/Cygwin do not support the visibility attribute with gcc releases prior to 4.
+ #endif
+ int a __attribute__ ((visibility("hidden")));
+ ])
+ ],[
+ mp_cv_attribute_mp_private="__attribute__((visibility(\"hidden\")))"
+ ],[
+ mp_cv_attribute_mp_private="no"
+ ])
+ ])
+
+ AC_MSG_RESULT([$mp_cv_attribute_mp_private])
+
+ if test x"$mp_cv_attribute_mp_private" = "xno"; then
+ MP_PRIVATE=""
+ else
+ MP_PRIVATE="$mp_cv_attribute_mp_private"
+ fi
+
+ AC_DEFINE_UNQUOTED(MP_PRIVATE, $MP_PRIVATE, [Mark private symbols])
+])
+
+
+#------------------------------------------------------------------------
+# MP_OBJC_RUNTIME --
+#
+# Determine the default, working Objective C runtime
+#
+# Arguments:
+# None.
+#
+# Requires:
+# none
+#
+# Depends:
+# AC_PROG_OBJC from objc.m4
+#
+# Results:
+#
+# Adds a --with-objc-runtime switch to configure.
+# Result is cached.
+#
+# Defines one of the following preprocessor macros:
+# APPLE_RUNTIME GNU_RUNTIME
+#
+# Substitutes the following variables:
+# OBJC_RUNTIME OBJC_RUNTIME_FLAGS OBJC_LIBS
+# OBJC_PTHREAD_CFLAGS OBJC_PTHREAD_LIBS
+#------------------------------------------------------------------------
+AC_DEFUN([MP_OBJC_RUNTIME],[
+ AC_REQUIRE([AC_PROG_OBJC])
+ AC_ARG_WITH(objc-runtime, AC_HELP_STRING([--with-objc-runtime], [Specify either "GNU" or "apple"]), [with_objc_runtime=${withval}])
+
+ if test x"${with_objc_runtime}" != x; then
+ case "${with_objc_runtime}" in
+ GNU)
+ ;;
+ apple)
+ ;;
+ *)
+ AC_MSG_ERROR([${with_objc_runtime} is not a valid argument to --with-objc-runtime. Please specify either "GNU" or "apple"])
+ ;;
+ esac
+ fi
+
+ AC_LANG_PUSH([Objective C])
+
+ # Check for common header, objc/objc.h
+ AC_CHECK_HEADERS([objc/objc.h], ,[AC_MSG_ERROR([Can't locate Objective C runtime headers])])
+
+ # Save LIBS & OBJCFLAGS
+ # depending on whether the cache is used,
+ # the variables may or may not be modified.
+ OLD_LIBS="${LIBS}"
+ OLD_OBJCFLAGS="${OBJCFLAGS}"
+
+ # Add -lobjc. The following tests will ensure that the library exists and functions with the detected Objective C compiler
+ LIBS="${LIBS} -lobjc"
+
+ # Test if pthreads are required to link against
+ # libobjc - this is the case on FreeBSD.
+
+ AC_MSG_CHECKING([if linking libobjc requires pthreads])
+ AC_CACHE_VAL(mp_cv_objc_req_pthread, [
+ # First, test if objc links without pthreads
+ # The following uses quadrigraphs
+ # '@<:@' = '['
+ # '@:>@' = ']'
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <objc/objc.h>
+ #include <objc/Object.h>
+ ], [
+ Object *obj = @<:@Object alloc@:>@;
+ puts(@<:@obj name@:>@);
+ ])
+ ], [
+ # Linked without -pthread
+ mp_cv_objc_req_pthread="no"
+ ], [
+ # Failed to link without -pthread
+ mp_cv_objc_req_pthread="yes"
+ ]
+ )
+
+ # If the above failed, try with pthreads
+ if test x"${mp_cv_objc_req_pthread}" = x"yes"; then
+ LIBS="${LIBS} ${PTHREAD_LIBS}"
+ OBJCFLAGS="${OBJCFLAGS} ${PTHREAD_CFLAGS}"
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <objc/objc.h>
+ #include <objc/Object.h>
+ ], [
+ Object *obj = @<:@Object alloc@:>@;
+ puts(@<:@obj name@:>@);
+ ])
+ ], [
+ # Linked with -lpthread
+ mp_cv_objc_req_pthread="yes"
+ ], [
+ # Failed to link against objc at all
+ # This will be caught in the runtime
+ # checks below
+ mp_cv_objc_req_pthread="no"
+ ]
+ )
+ fi
+ ])
+ AC_MSG_RESULT(${mp_cv_objc_req_pthread})
+
+ if test x"${mp_cv_objc_req_pthread}" = x"no"; then
+ OBJC_LIBS="-lobjc"
+ OBJC_PTHREAD_LIBS="${PTHREAD_LIBS}"
+ OBJC_PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
+ elif test x"${mp_cv_objc_req_pthread}" = x"yes"; then
+ OBJC_LIBS="-lobjc ${PTHREAD_LIBS}"
+ OBJCFLAGS="${OBJCFLAGS} ${PTHREAD_CFLAGS}"
+ fi
+
+ if test x"${with_objc_runtime}" = x || test x"${with_objc_runtime}" = x"apple"; then
+ AC_MSG_CHECKING([for Apple Objective-C runtime])
+ AC_CACHE_VAL(mp_cv_objc_runtime_apple, [
+ # The following uses quadrigraphs
+ # '@<:@' = '['
+ # '@:>@' = ']'
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <objc/objc.h>
+ #include <objc/objc-api.h>
+ ], [
+ id class = objc_lookUpClass("Object");
+ id obj = @<:@class alloc@:>@;
+ puts(@<:@obj name@:>@);
+ ])
+ ], [
+ mp_cv_objc_runtime_apple="yes"
+ ], [
+ mp_cv_objc_runtime_apple="no"
+ ]
+ )
+ ])
+ AC_MSG_RESULT(${mp_cv_objc_runtime_apple})
+ else
+ mp_cv_objc_runtime_apple="no"
+ fi
+
+ if test x"${with_objc_runtime}" = x || test x"${with_objc_runtime}" = x"GNU"; then
+ AC_MSG_CHECKING([for GNU Objective C runtime])
+ AC_CACHE_VAL(mp_cv_objc_runtime_gnu, [
+ # The following uses quadrigraphs
+ # '@<:@' = '['
+ # '@:>@' = ']'
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <objc/objc.h>
+ #include <objc/objc-api.h>
+ ], [
+ id class = objc_lookup_class("Object");
+ id obj = @<:@class alloc@:>@;
+ puts(@<:@obj name@:>@);
+ ])
+ ], [
+ mp_cv_objc_runtime_gnu="yes"
+ ], [
+ mp_cv_objc_runtime_gnu="no"
+ ]
+ )
+ ])
+ AC_MSG_RESULT(${mp_cv_objc_runtime_gnu})
+ else
+ mp_cv_objc_runtime_gnu="no"
+ fi
+
+ # Apple runtime is prefered
+ if test x"${mp_cv_objc_runtime_apple}" = x"yes"; then
+ OBJC_RUNTIME="APPLE_RUNTIME"
+ OBJC_RUNTIME_FLAGS="-fnext-runtime"
+ AC_MSG_NOTICE([Using Apple Objective-C runtime])
+ AC_DEFINE([APPLE_RUNTIME], 1, [Define if using the Apple Objective-C runtime and compiler.])
+ elif test x"${mp_cv_objc_runtime_gnu}" = x"yes"; then
+ OBJC_RUNTIME="GNU_RUNTIME"
+ OBJC_RUNTIME_FLAGS="-fgnu-runtime"
+ AC_MSG_NOTICE([Using GNU Objective-C runtime])
+ AC_DEFINE([GNU_RUNTIME], 1, [Define if using the GNU Objective-C runtime and compiler.])
+ else
+ AC_MSG_FAILURE([Could not locate a working Objective-C runtime.])
+ fi
+
+ # Restore LIBS & OBJCFLAGS
+ LIBS="${OLD_LIBS}"
+ OBJCFLAGS="${OLD_OBJCFLAGS}"
+
+ AC_SUBST([OBJC_RUNTIME])
+ AC_SUBST([OBJC_RUNTIME_FLAGS])
+ AC_SUBST([OBJC_LIBS])
+
+ AC_SUBST([OBJC_PTHREAD_LIBS])
+ AC_SUBST([OBJC_PTHREAD_CFLAGS])
+
+ AC_LANG_POP([Objective C])
+])
+
+#------------------------------------------------------------------------
+# MP_OBJC_FOUNDATION --
+#
+# Find a functional Foundation implementation.
+# The NeXT Foundation implementation is prefered,
+# as it is most likely to be the system provided
+# Foundation.
+#
+# Arguments:
+# None.
+#
+# Requires:
+# OBJC_RUNTIME
+#
+# Depends:
+# AC_PROG_OBJC from objc.m4
+#
+# Results:
+#
+# Adds a --with-objc-foundation switch to configure.
+# Result is cached.
+#
+# Defines one of the following preprocessor macros:
+# APPLE_FOUNDATION GNUSTEP_FOUNDATION
+#------------------------------------------------------------------------
+AC_DEFUN([MP_OBJC_FOUNDATION],[
+ AC_REQUIRE([AC_PROG_OBJC])
+ AC_ARG_WITH(objc-foundation, [ --with-objc-foundation Specify either "GNUstep" or "apple"], [with_objc_foundation=${withval}])
+
+ if test x"${with_objc_foundation}" != x; then
+ case "${with_objc_foundation}" in
+ GNUstep)
+ ;;
+ GNU)
+ with_objc_foundation="GNUstep"
+ ;;
+ apple)
+ ;;
+ *)
+ AC_MSG_ERROR([${with_objc_foundation} is not a valid argument to --with-objc-foundation. Please specify either "GNU" or "apple"])
+ ;;
+ esac
+ fi
+
+ AC_LANG_PUSH([Objective C])
+
+ if test x"${with_objc_foundation}" == x || test x"${with_objc_foundation}" == x"apple"; then
+ # '@<:@' = '['
+ # '@:>@' = ']'
+ AC_MSG_CHECKING([for Apple Foundation library])
+
+ # Set NeXT LIBS and CFLAGS
+ APPLE_FOUNDATION_CFLAGS="-framework Foundation"
+ APPLE_FOUNDATION_LIBS="-framework Foundation"
+
+ AC_CACHE_VAL(ac_cv_objc_foundation_apple, [
+ # Save old LIBS and CFLAGS
+ LIBS_OLD="${LIBS}"
+ CFLAGS_OLD="${CFLAGS}"
+
+ CFLAGS="${APPLE_FOUNDATION_CFLAGS} ${CFLAGS}"
+ LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
+
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <Foundation/Foundation.h>
+ ], [
+ NSString *string = @<:@@<:@NSString alloc@:>@ initWithCString: "Hello World"@:>@;
+ @<:@NSString length@:>@;
+ ])
+ ],[
+ ac_cv_objc_foundation_apple="yes"
+ ],[
+ ac_cv_objc_foundation_apple="no"
+ ]
+ )
+ # Restore LIBS and CFLAGS
+ LIBS="${LIBS_OLD}"
+ CFLAGS="${CFLAGS_OLD}"
+ ])
+ AC_MSG_RESULT(${ac_cv_objc_foundation_apple})
+ else
+ ac_cv_objc_foundation_apple="no"
+ fi
+
+ if test x"${with_objc_foundation}" == x || test x${with_objc_foundation} == x"GNUstep"; then
+ if test x"${GNUSTEP_SYSTEM_ROOT}" == x; then
+ if test x"${with_objc_foundation}" == x"GNUstep"; then
+ AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
+ else
+ AC_MSG_WARN([GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library])
+ fi
+ else
+
+ AC_MSG_CHECKING([for GNUstep Foundation library])
+
+ # Set GNUstep LDFLAGS, CPPFLAGS, and LIBS
+ GNUSTEP_LDFLAGS="-L${GNUSTEP_SYSTEM_ROOT}/Library/Libraries/"
+ GNUSTEP_CPPFLAGS="-I${GNUSTEP_SYSTEM_ROOT}/Library/Headers/"
+ GNUSTEP_LIBS="-lgnustep-base"
+
+ AC_CACHE_VAL(ac_cv_objc_foundation_gnustep, [
+ # Save old LDFLAGS, CPPFLAGS, and LIBS
+ LDFLAGS_OLD="${LDFLAGS}"
+ CPPFLAGS_OLD="${CPPFLAGS}"
+ LIBS_OLD="${LIBS}"
+
+ LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
+ CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
+ LIBS="${GNUSTEP_LIBS} ${LIBS}"
+
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <Foundation/Foundation.h>
+ ], [
+ NSString *string = @<:@@<:@NSString alloc@:>@ initWithCString: "Hello World"@:>@;
+ @<:@NSString length@:>@;
+ ])
+ ],[
+ ac_cv_objc_foundation_gnustep="yes"
+ ],[
+ ac_cv_objc_foundation_gnustep="no"
+ ]
+ )
+ # Restore LDFLAGS, CPPFLAGS, and LIBS
+ LDFLAGS="${LDFLAGS_OLD}"
+ CPPFLAGS="${CPPFLAGS_OLD}"
+ LIBS="${LIBS_OLD}"
+ ])
+ AC_MSG_RESULT(${ac_cv_objc_foundation_gnustep})
+ fi
+ else
+ ac_cv_objc_foundation_gnustep="no"
+ fi
+
+ # NeXT Foundation is prefered
+ if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
+ OBJC_FOUNDATION="Apple"
+ CPPFLAGS="${APPLE_FOUNDATION_CPPFLAGS} ${CPPFLAGS}"
+ LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
+ AC_DEFINE([APPLE_FOUNDATION], 1, [Define if using the Apple Foundation framework])
+ AC_MSG_NOTICE([Using Apple Foundation library])
+ elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
+ OBJC_FOUNDATION="GNUstep"
+ CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
+ LIBS="${GNUSTEP_LIBS} ${LIBS}"
+ LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
+ AC_DEFINE([GNUSTEP_FOUNDATION], 1, [Define if using the GNUstep Foundation library])
+ AC_MSG_NOTICE([Using GNUstep Foundation library])
+ else
+ AC_MSG_ERROR([Could not find a working Foundation implementation])
+ fi
+
+ AC_LANG_POP([Objective C])
+])
Added: branches/dp2mp-move/base/objc.m4
===================================================================
--- branches/dp2mp-move/base/objc.m4 (rev 0)
+++ branches/dp2mp-move/base/objc.m4 2007-06-15 08:06:03 UTC (rev 26175)
@@ -0,0 +1,623 @@
+# objc.m4
+# Based on c.m4 from GNU Autoconf
+# The Objective C support, added by Landon Fuller <landonf at opendarwin.org>
+# on March 10th, 2004, is heavily based on Autoconf's existing C++ support.
+#
+########### Copyright and Licensing terms ##########
+#
+# This file is part of Autoconf. -*- Autoconf -*-
+# Programming languages support.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf. You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them. The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf. We call these the "data" portions. The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case. We call these
+# comments and executable code the "non-data" portions. Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation. When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with. (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.) If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by David MacKenzie, with help from
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+#
+########## GNU General Public License (GPL), version 2 ##########
+#
+# GNU GENERAL PUBLIC LICENSE
+# Version 2, June 1991
+#
+# Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Everyone is permitted to copy and distribute verbatim copies
+# of this license document, but changing it is not allowed.
+#
+# Preamble
+#
+# The licenses for most software are designed to take away your
+# freedom to share and change it. By contrast, the GNU General Public
+# License is intended to guarantee your freedom to share and change free
+# software--to make sure the software is free for all its users. This
+# General Public License applies to most of the Free Software
+# Foundation's software and to any other program whose authors commit to
+# using it. (Some other Free Software Foundation software is covered by
+# the GNU Library General Public License instead.) You can apply it to
+# your programs, too.
+#
+# When we speak of free software, we are referring to freedom, not
+# price. Our General Public Licenses are designed to make sure that you
+# have the freedom to distribute copies of free software (and charge for
+# this service if you wish), that you receive source code or can get it
+# if you want it, that you can change the software or use pieces of it
+# in new free programs; and that you know you can do these things.
+#
+# To protect your rights, we need to make restrictions that forbid
+# anyone to deny you these rights or to ask you to surrender the rights.
+# These restrictions translate to certain responsibilities for you if you
+# distribute copies of the software, or if you modify it.
+#
+# For example, if you distribute copies of such a program, whether
+# gratis or for a fee, you must give the recipients all the rights that
+# you have. You must make sure that they, too, receive or can get the
+# source code. And you must show them these terms so they know their
+# rights.
+#
+# We protect your rights with two steps: (1) copyright the software, and
+# (2) offer you this license which gives you legal permission to copy,
+# distribute and/or modify the software.
+#
+# Also, for each author's protection and ours, we want to make certain
+# that everyone understands that there is no warranty for this free
+# software. If the software is modified by someone else and passed on, we
+# want its recipients to know that what they have is not the original, so
+# that any problems introduced by others will not reflect on the original
+# authors' reputations.
+#
+# Finally, any free program is threatened constantly by software
+# patents. We wish to avoid the danger that redistributors of a free
+# program will individually obtain patent licenses, in effect making the
+# program proprietary. To prevent this, we have made it clear that any
+# patent must be licensed for everyone's free use or not licensed at all.
+#
+# The precise terms and conditions for copying, distribution and
+# modification follow.
+#
+# GNU GENERAL PUBLIC LICENSE
+# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+#
+# 0. This License applies to any program or other work which contains
+# a notice placed by the copyright holder saying it may be distributed
+# under the terms of this General Public License. The "Program", below,
+# refers to any such program or work, and a "work based on the Program"
+# means either the Program or any derivative work under copyright law:
+# that is to say, a work containing the Program or a portion of it,
+# either verbatim or with modifications and/or translated into another
+# language. (Hereinafter, translation is included without limitation in
+# the term "modification".) Each licensee is addressed as "you".
+#
+# Activities other than copying, distribution and modification are not
+# covered by this License; they are outside its scope. The act of
+# running the Program is not restricted, and the output from the Program
+# is covered only if its contents constitute a work based on the
+# Program (independent of having been made by running the Program).
+# Whether that is true depends on what the Program does.
+#
+# 1. You may copy and distribute verbatim copies of the Program's
+# source code as you receive it, in any medium, provided that you
+# conspicuously and appropriately publish on each copy an appropriate
+# copyright notice and disclaimer of warranty; keep intact all the
+# notices that refer to this License and to the absence of any warranty;
+# and give any other recipients of the Program a copy of this License
+# along with the Program.
+#
+# You may charge a fee for the physical act of transferring a copy, and
+# you may at your option offer warranty protection in exchange for a fee.
+#
+# 2. You may modify your copy or copies of the Program or any portion
+# of it, thus forming a work based on the Program, and copy and
+# distribute such modifications or work under the terms of Section 1
+# above, provided that you also meet all of these conditions:
+#
+# a) You must cause the modified files to carry prominent notices
+# stating that you changed the files and the date of any change.
+#
+# b) You must cause any work that you distribute or publish, that in
+# whole or in part contains or is derived from the Program or any
+# part thereof, to be licensed as a whole at no charge to all third
+# parties under the terms of this License.
+#
+# c) If the modified program normally reads commands interactively
+# when run, you must cause it, when started running for such
+# interactive use in the most ordinary way, to print or display an
+# announcement including an appropriate copyright notice and a
+# notice that there is no warranty (or else, saying that you provide
+# a warranty) and that users may redistribute the program under
+# these conditions, and telling the user how to view a copy of this
+# License. (Exception: if the Program itself is interactive but
+# does not normally print such an announcement, your work based on
+# the Program is not required to print an announcement.)
+#
+# These requirements apply to the modified work as a whole. If
+# identifiable sections of that work are not derived from the Program,
+# and can be reasonably considered independent and separate works in
+# themselves, then this License, and its terms, do not apply to those
+# sections when you distribute them as separate works. But when you
+# distribute the same sections as part of a whole which is a work based
+# on the Program, the distribution of the whole must be on the terms of
+# this License, whose permissions for other licensees extend to the
+# entire whole, and thus to each and every part regardless of who wrote it.
+#
+# Thus, it is not the intent of this section to claim rights or contest
+# your rights to work written entirely by you; rather, the intent is to
+# exercise the right to control the distribution of derivative or
+# collective works based on the Program.
+#
+# In addition, mere aggregation of another work not based on the Program
+# with the Program (or with a work based on the Program) on a volume of
+# a storage or distribution medium does not bring the other work under
+# the scope of this License.
+#
+# 3. You may copy and distribute the Program (or a work based on it,
+# under Section 2) in object code or executable form under the terms of
+# Sections 1 and 2 above provided that you also do one of the following:
+#
+# a) Accompany it with the complete corresponding machine-readable
+# source code, which must be distributed under the terms of Sections
+# 1 and 2 above on a medium customarily used for software interchange; or,
+#
+# b) Accompany it with a written offer, valid for at least three
+# years, to give any third party, for a charge no more than your
+# cost of physically performing source distribution, a complete
+# machine-readable copy of the corresponding source code, to be
+# distributed under the terms of Sections 1 and 2 above on a medium
+# customarily used for software interchange; or,
+#
+# c) Accompany it with the information you received as to the offer
+# to distribute corresponding source code. (This alternative is
+# allowed only for noncommercial distribution and only if you
+# received the program in object code or executable form with such
+# an offer, in accord with Subsection b above.)
+#
+# The source code for a work means the preferred form of the work for
+# making modifications to it. For an executable work, complete source
+# code means all the source code for all modules it contains, plus any
+# associated interface definition files, plus the scripts used to
+# control compilation and installation of the executable. However, as a
+# special exception, the source code distributed need not include
+# anything that is normally distributed (in either source or binary
+# form) with the major components (compiler, kernel, and so on) of the
+# operating system on which the executable runs, unless that component
+# itself accompanies the executable.
+#
+# If distribution of executable or object code is made by offering
+# access to copy from a designated place, then offering equivalent
+# access to copy the source code from the same place counts as
+# distribution of the source code, even though third parties are not
+# compelled to copy the source along with the object code.
+#
+# 4. You may not copy, modify, sublicense, or distribute the Program
+# except as expressly provided under this License. Any attempt
+# otherwise to copy, modify, sublicense or distribute the Program is
+# void, and will automatically terminate your rights under this License.
+# However, parties who have received copies, or rights, from you under
+# this License will not have their licenses terminated so long as such
+# parties remain in full compliance.
+#
+# 5. You are not required to accept this License, since you have not
+# signed it. However, nothing else grants you permission to modify or
+# distribute the Program or its derivative works. These actions are
+# prohibited by law if you do not accept this License. Therefore, by
+# modifying or distributing the Program (or any work based on the
+# Program), you indicate your acceptance of this License to do so, and
+# all its terms and conditions for copying, distributing or modifying
+# the Program or works based on it.
+
+# 6. Each time you redistribute the Program (or any work based on the
+# Program), the recipient automatically receives a license from the
+# original licensor to copy, distribute or modify the Program subject to
+# these terms and conditions. You may not impose any further
+# restrictions on the recipients' exercise of the rights granted herein.
+# You are not responsible for enforcing compliance by third parties to
+# this License.
+#
+# 7. If, as a consequence of a court judgment or allegation of patent
+# infringement or for any other reason (not limited to patent issues),
+# conditions are imposed on you (whether by court order, agreement or
+# otherwise) that contradict the conditions of this License, they do not
+# excuse you from the conditions of this License. If you cannot
+# distribute so as to satisfy simultaneously your obligations under this
+# License and any other pertinent obligations, then as a consequence you
+# may not distribute the Program at all. For example, if a patent
+# license would not permit royalty-free redistribution of the Program by
+# all those who receive copies directly or indirectly through you, then
+# the only way you could satisfy both it and this License would be to
+# refrain entirely from distribution of the Program.
+#
+# If any portion of this section is held invalid or unenforceable under
+# any particular circumstance, the balance of the section is intended to
+# apply and the section as a whole is intended to apply in other
+# circumstances.
+#
+# It is not the purpose of this section to induce you to infringe any
+# patents or other property right claims or to contest validity of any
+# such claims; this section has the sole purpose of protecting the
+# integrity of the free software distribution system, which is
+# implemented by public license practices. Many people have made
+# generous contributions to the wide range of software distributed
+# through that system in reliance on consistent application of that
+# system; it is up to the author/donor to decide if he or she is willing
+# to distribute software through any other system and a licensee cannot
+# impose that choice.
+#
+# This section is intended to make thoroughly clear what is believed to
+# be a consequence of the rest of this License.
+#
+# 8. If the distribution and/or use of the Program is restricted in
+# certain countries either by patents or by copyrighted interfaces, the
+# original copyright holder who places the Program under this License
+# may add an explicit geographical distribution limitation excluding
+# those countries, so that distribution is permitted only in or among
+# countries not thus excluded. In such case, this License incorporates
+# the limitation as if written in the body of this License.
+#
+# 9. The Free Software Foundation may publish revised and/or new versions
+# of the General Public License from time to time. Such new versions will
+# be similar in spirit to the present version, but may differ in detail to
+# address new problems or concerns.
+#
+# Each version is given a distinguishing version number. If the Program
+# specifies a version number of this License which applies to it and "any
+# later version", you have the option of following the terms and conditions
+# either of that version or of any later version published by the Free
+# Software Foundation. If the Program does not specify a version number of
+# this License, you may choose any version ever published by the Free Software
+# Foundation.
+#
+# 10. If you wish to incorporate parts of the Program into other free
+# programs whose distribution conditions are different, write to the author
+# to ask for permission. For software which is copyrighted by the Free
+# Software Foundation, write to the Free Software Foundation; we sometimes
+# make exceptions for this. Our decision will be guided by the two goals
+# of preserving the free status of all derivatives of our free software and
+# of promoting the sharing and reuse of software generally.
+#
+# NO WARRANTY
+#
+# 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+# FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+# OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+# PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+# OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+# TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+# PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+# REPAIR OR CORRECTION.
+#
+# 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+# WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+# REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+# INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+# OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+# TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+# YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+# PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGES.
+#
+# END OF TERMS AND CONDITIONS
+#
+# How to Apply These Terms to Your New Programs
+#
+# If you develop a new program, and you want it to be of the greatest
+# possible use to the public, the best way to achieve this is to make it
+# free software which everyone can redistribute and change under these terms.
+#
+# To do so, attach the following notices to the program. It is safest
+# to attach them to the start of each source file to most effectively
+# convey the exclusion of warranty; and each file should have at least
+# the "copyright" line and a pointer to where the full notice is found.
+#
+# <one line to give the program's name and a brief idea of what it does.>
+# Copyright (C) <year> <name of author>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#
+# Also add information on how to contact you by electronic and paper mail.
+#
+# If the program is interactive, make it output a short notice like this
+# when it starts in an interactive mode:
+#
+# Gnomovision version 69, Copyright (C) year name of author
+# Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; type `show c' for details.
+#
+# The hypothetical commands `show w' and `show c' should show the appropriate
+# parts of the General Public License. Of course, the commands you use may
+# be called something other than `show w' and `show c'; they could even be
+# mouse-clicks or menu items--whatever suits your program.
+#
+# You should also get your employer (if you work as a programmer) or your
+# school, if any, to sign a "copyright disclaimer" for the program, if
+# necessary. Here is a sample; alter the names:
+#
+# Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+# `Gnomovision' (which makes passes at compilers) written by James Hacker.
+#
+# <signature of Ty Coon>, 1 April 1989
+# Ty Coon, President of Vice
+#
+# This General Public License does not permit incorporating your program into
+# proprietary programs. If your program is a subroutine library, you may
+# consider it more useful to permit linking proprietary applications with the
+# library. If this is what you want to do, use the GNU Library General
+# Public License instead of this License.
+#
+########## End of GNU General Public License (GPL), version 2 ##########
+
+## ----------------------- ##
+## 1. Language selection. ##
+## ----------------------- ##
+
+
+# ------------------------------ #
+# 1d. The Objective C language. #
+# ------------------------------ #
+
+# AC_LANG(Objective C)
+# --------------------
+# OBJCFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+m4_define([AC_LANG(Objective C)],
+[ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+])
+
+
+# AC_LANG_OBJC
+# -------------------------
+AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)])
+
+
+# _AC_LANG_ABBREV(Objective C)
+# ----------------------------
+m4_define([_AC_LANG_ABBREV(Objective C)], [objc])
+
+
+# _AC_LANG_PREFIX(Objective C)
+# ----------------------------
+m4_define([_AC_LANG_PREFIX(Objective C)], [OBJC])
+
+
+
+## ---------------------- ##
+## 2.Producing programs. ##
+## ---------------------- ##
+
+
+# ------------------------- #
+# 2d. Objective C sources. #
+# ------------------------- #
+
+# AC_LANG_SOURCE(Objective C)(BODY)
+# ---------------------------------
+m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(Objective C)])
+
+
+# AC_LANG_PROGRAM(Objective C)([PROLOGUE], [BODY])
+# ------------------------------------------------
+m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(Objective C)])
+
+
+# AC_LANG_CALL(Objective C)(PROLOGUE, FUNCTION)
+# ---------------------------------------------
+m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(Objective C)])
+
+
+# AC_LANG_FUNC_LINK_TRY(Objective C)(FUNCTION)
+# --------------------------------------------
+m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(Objective C)])
+
+
+# AC_LANG_BOOL_COMPILE_TRY(Objective C)(PROLOGUE, EXPRESSION)
+# -----------------------------------------------------------
+m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(Objective C)])
+
+
+# AC_LANG_INT_SAVE(Objective C)(PROLOGUE, EXPRESSION)
+# ---------------------------------------------------
+m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(Objective C)])
+
+
+
+## -------------------------------------------- ##
+## 3. Looking for Compilers and Preprocessors. ##
+## -------------------------------------------- ##
+
+
+# ------------------------------ #
+# 3d. The Objective C compiler. #
+# ------------------------------ #
+
+
+# AC_LANG_PREPROC(Objecitve C)
+# ----------------------------
+# Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able.
+AC_DEFUN([AC_LANG_PREPROC(Objective C)],
+[AC_REQUIRE([AC_PROG_OBJCPP])])
+
+
+# AC_PROG_OBJCPP
+# --------------
+# Find a working Objective C preprocessor.
+# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
+# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_OBJC.
+AC_DEFUN([AC_PROG_OBJCPP],
+[AC_REQUIRE([AC_PROG_OBJC])dnl
+AC_ARG_VAR([OBJCPP], [Objective C preprocessor])dnl
+_AC_ARG_VAR_CPPFLAGS()dnl
+AC_LANG_PUSH(Objective C)dnl
+AC_MSG_CHECKING([how to run the Objective C preprocessor])
+if test -z "$OBJCPP"; then
+ AC_CACHE_VAL(ac_cv_prog_OBJCPP,
+ [dnl
+ # Double quotes because OBJCPP needs to be expanded
+ for OBJCPP in "$OBJC -E" "/lib/cpp"
+ do
+ _AC_PROG_PREPROC_WORKS_IFELSE([break])
+ done
+ ac_cv_prog_OBJCPP=$OBJCPP
+ ])dnl
+ OBJCPP=$ac_cv_prog_OBJCPP
+else
+ ac_cv_prog_OBJCPP=$OBJCPP
+fi
+AC_MSG_RESULT([$OBJCPP])
+_AC_PROG_PREPROC_WORKS_IFELSE([],
+ [AC_MSG_FAILURE([Objective C preprocessor "$OBJCPP" fails sanity check])])
+AC_SUBST(OBJCPP)dnl
+AC_LANG_POP(Objective C)dnl
+])# AC_PROG_OBJCPP
+
+
+# AC_LANG_COMPILER(Objective C)
+# -----------------------------
+# Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able.
+AC_DEFUN([AC_LANG_COMPILER(Objective C)],
+[AC_REQUIRE([AC_PROG_OBJC])])
+
+
+# ac_cv_prog_objc
+# ---------------
+# We used to name the cache variable this way.
+AU_DEFUN([ac_cv_prog_objc],
+[ac_cv_objc_compiler_gnu])
+
+
+# AC_PROG_OBJC([LIST-OF-COMPILERS])
+# ---------------------------------
+# LIST-OF-COMPILERS is a space separated list of Objective C compilers
+# to search for (if not specified, a default list is used). This just gives
+# the user an opportunity to specify an alternative search list for the
+# Objective C compiler.
+# cc Native compiler
+# objc David Stes' Portable Object Compiler
+AN_MAKEVAR([OBJC], [AC_PROG_OBJC])
+AN_PROGRAM([gcc], [AC_PROG_OBJC])
+AN_PROGRAM([cc], [AC_PROG_OBJC])
+AC_DEFUN([AC_PROG_OBJC],
+[AC_LANG_PUSH(Objective C)dnl
+AC_ARG_VAR([OBJC], [Objective C compiler command])dnl
+AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+_AC_ARG_VAR_CPPFLAGS()dnl
+AC_CHECK_TOOLS(OBJC,
+ [$CCC m4_default([$1],
+ [gcc cc objc])],
+ gcc)
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+_AC_LANG_COMPILER_GNU
+GOBJC=`test $ac_compiler_gnu = yes && echo yes`
+_AC_PROG_OBJC_G
+AC_LANG_POP(Objective C)dnl
+])# AC_PROG_OBJC
+
+
+# _AC_PROG_OBJC_G
+# ---------------
+# Check whether -g works, even if OBJCFLAGS is set, in case the package
+# plays around with OBJCFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
+m4_define([_AC_PROG_OBJC_G],
+[ac_test_OBJCFLAGS=${OBJCFLAGS+set}
+ac_save_OBJCFLAGS=$OBJCFLAGS
+OBJCFLAGS="-g"
+AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g,
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [ac_cv_prog_objc_g=yes],
+ [ac_cv_prog_objc_g=no])])
+if test "$ac_test_OBJCFLAGS" = set; then
+ OBJCFLAGS=$ac_save_OBJCFLAGS
+elif test $ac_cv_prog_objc_g = yes; then
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-g -O2"
+ else
+ OBJCFLAGS="-g"
+ fi
+else
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-O2"
+ else
+ OBJCFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_OBJC_G
+
+
+## ------------------------------- ##
+## 4. Compilers' characteristics. ##
+## ------------------------------- ##
+
+
+# -------------------------------- #
+# 4b. C compiler characteristics. #
+# -------------------------------- #
+
+# libobjc and objc header tests shere?
Modified: branches/dp2mp-move/base/src/config.h.in
===================================================================
--- branches/dp2mp-move/base/src/config.h.in 2007-06-15 07:30:36 UTC (rev 26174)
+++ branches/dp2mp-move/base/src/config.h.in 2007-06-15 08:06:03 UTC (rev 26175)
@@ -1,8 +1,20 @@
/* src/config.h.in. Generated from configure.ac by autoheader. */
+/* Define if using the Apple Foundation framework */
+#undef APPLE_FOUNDATION
+
+/* Define if using the Apple Objective-C runtime and compiler. */
+#undef APPLE_RUNTIME
+
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID
+/* Define if using the GNUstep Foundation library */
+#undef GNUSTEP_FOUNDATION
+
+/* Define if using the GNU Objective-C runtime and compiler. */
+#undef GNU_RUNTIME
+
/* Define to 1 if you have the `bzero' function. */
#undef HAVE_BZERO
@@ -111,6 +123,9 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
+/* Define to 1 if you have the <objc/objc.h> header file. */
+#undef HAVE_OBJC_OBJC_H
+
/* Define to 1 if you have the <openssl/md5.h> header file. */
#undef HAVE_OPENSSL_MD5_H
@@ -218,6 +233,9 @@
/* Lowest non-system-reserved UID. */
#undef MIN_USABLE_UID
+/* Mark private symbols */
+#undef MP_PRIVATE
+
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070615/804be8bc/attachment.html
More information about the macports-changes
mailing list