summaryrefslogtreecommitdiff
path: root/libobjc/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libobjc/configure')
-rwxr-xr-xlibobjc/configure385
1 files changed, 354 insertions, 31 deletions
diff --git a/libobjc/configure b/libobjc/configure
index b692eedeff7..43a68de9977 100755
--- a/libobjc/configure
+++ b/libobjc/configure
@@ -600,6 +600,13 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
+OBJC_BOEHM_GC_LIBS
+OBJC_BOEHM_GC_INCLUDES
+OBJC_BOEHM_GC
+OBJC_GCFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
SET_MAKE
CPP
OTOOL64
@@ -654,9 +661,6 @@ host_vendor
host_cpu
host
multi_basedir
-OBJC_BOEHM_GC_INCLUDES
-OBJC_BOEHM_GC
-OBJC_GCFLAGS
VERSION
target_subdir
host_subdir
@@ -711,7 +715,6 @@ with_build_libsubdir
with_target_subdir
with_cross_host
enable_version_specific_runtime_libs
-enable_objc_gc
enable_multilib
enable_maintainer_mode
enable_shared
@@ -721,12 +724,19 @@ enable_fast_install
with_gnu_ld
enable_libtool_lock
enable_tls
+enable_objc_gc
+with_target_bdw_gc
+with_target_bdw_gc_include
+with_target_bdw_gc_lib
'
ac_precious_vars='build_alias
host_alias
target_alias
CPP
-CPPFLAGS'
+CPPFLAGS
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR'
# Initialize some variables set by options.
@@ -1343,8 +1353,6 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory
- --enable-objc-gc enable the use of Boehm's garbage collector with
- the GNU Objective-C runtime.
--enable-multilib build many library versions (default)
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
@@ -1354,6 +1362,8 @@ Optional Features:
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-tls Use thread-local storage [default=yes]
+ --enable-objc-gc enable use of Boehm's garbage collector with the GNU
+ Objective-C runtime
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1365,6 +1375,16 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-target-bdw-gc=PATHLIST
+ specify prefix directory for installed bdw-gc
+ package. Equivalent to
+ --with-target-bdw-gc-include=PATH/include plus
+ --with-target-bdw-gc-lib=PATH/lib
+ --with-target-bdw-gc-include=PATHLIST
+ specify directories for installed bdw-gc include
+ files
+ --with-target-bdw-gc-lib=PATHLIST
+ specify directories for installed bdw-gc library
Some influential environment variables:
CC C compiler command
@@ -1375,6 +1395,11 @@ Some influential environment variables:
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -2314,28 +2339,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_specific_libs" >&5
$as_echo "$version_specific_libs" >&6; }
-# Check whether --enable-objc-gc was given.
-if test "${enable_objc_gc+set}" = set; then :
- enableval=$enable_objc_gc; case $enable_objc_gc in
- no)
- OBJC_GCFLAGS=''
- OBJC_BOEHM_GC=''
- OBJC_BOEHM_GC_INCLUDES=''
- ;;
- *)
- OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
- OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
- OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
- ;;
-esac
-else
- OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''
-fi
-
-
-
-
-
# -----------
# Directories
# -----------
@@ -10598,7 +10601,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10601 "configure"
+#line 10604 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10704,7 +10707,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10707 "configure"
+#line 10710 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11499,6 +11502,326 @@ $as_echo "#define HAVE_BITFIELD_TYPE_MATTERS 1" >>confdefs.h
fi
+# -----------
+# boehm-gc
+# -----------
+
+# Check whether --enable-objc-gc was given.
+if test "${enable_objc_gc+set}" = set; then :
+ enableval=$enable_objc_gc;
+fi
+
+
+# Check whether --with-target-bdw-gc was given.
+if test "${with_target_bdw_gc+set}" = set; then :
+ withval=$with_target_bdw_gc;
+fi
+
+
+# Check whether --with-target-bdw-gc-include was given.
+if test "${with_target_bdw_gc_include+set}" = set; then :
+ withval=$with_target_bdw_gc_include;
+fi
+
+
+# Check whether --with-target-bdw-gc-lib was given.
+if test "${with_target_bdw_gc_lib+set}" = set; then :
+ withval=$with_target_bdw_gc_lib;
+fi
+
+
+case "$enable_objc_gc" in
+no)
+ use_bdw_gc=no
+ ;;
+*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bdw garbage collector" >&5
+$as_echo_n "checking for bdw garbage collector... " >&6; }
+ if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ 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_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bdw-gc\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "bdw-gc") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using bdw-gc pkg-config module" >&5
+$as_echo "using bdw-gc pkg-config module" >&6; }
+else
+ as_fn_error "no --with-target-bdw-gc options and no bdw-gc pkg-config module found" "$LINENO" 5
+fi
+ else
+ if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+ as_fn_error "found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing" "$LINENO" 5
+ elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+ as_fn_error "found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using paths configured with --with-target-bdw-gc options" >&5
+$as_echo "using paths configured with --with-target-bdw-gc options" >&6; }
+ fi
+ mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+ bdw_val=
+ if test "x$with_target_bdw_gc" != x; then
+ for i in `echo $with_target_bdw_gc | tr ',' ' '`; do
+ case "$i" in
+ *=*) sd=${i%%=*}; d=${i#*=} ;;
+ *) sd=.; d=$i ;;
+ esac
+ if test "$mldir" = "$sd"; then
+ bdw_val=$d
+ fi
+ done
+ if test "x$bdw_val" = x; then
+ as_fn_error "no multilib path ($mldir) found in --with-target-bdw-gc" "$LINENO" 5
+ fi
+ bdw_inc_dir="$bdw_val/include"
+ bdw_lib_dir="$bdw_val/lib"
+ fi
+ bdw_val=
+ if test "x$with_target_bdw_gc_include" != x; then
+ for i in `echo $with_target_bdw_gc_include | tr ',' ' '`; do
+ case "$i" in
+ *=*) sd=${i%%=*}; d=${i#*=} ;;
+ *) sd=.; d=$i ;;
+ esac
+ if test "$mldir" = "$sd"; then
+ bdw_val=$d
+ fi
+ done
+ if test "x$bdw_val" = x; then
+ as_fn_error "no multilib path ($mldir) found in --with-target-bdw-gc-include" "$LINENO" 5
+ fi
+ bdw_inc_dir="$bdw_val"
+ fi
+ bdw_val=
+ if test "x$with_target_bdw_gc_lib" != x; then
+ for i in `echo $with_target_bdw_gc_lib | tr ',' ' '`; do
+ case "$i" in
+ *=*) sd=${i%%=*}; d=${i#*=} ;;
+ *) sd=.; d=$i ;;
+ esac
+ if test "$mldir" = "$sd"; then
+ bdw_val=$d
+ fi
+ done
+ if test "x$bdw_val" = x; then
+ as_fn_error "no multilib path ($mldir) found in --with-target-bdw-gc-lib" "$LINENO" 5
+ fi
+ bdw_lib_dir="$bdw_val"
+ fi
+ if test "x$bdw_inc_dir" = x; then
+ as_fn_error "no multilib path ($mldir) found in --with-target-bdw-gc-include" "$LINENO" 5
+ fi
+ if test "x$bdw_lib_dir" = x; then
+ as_fn_error "no multilib path ($mldir) found in --with-target-bdw-gc-lib" "$LINENO" 5
+ fi
+ BDW_GC_CFLAGS="-I$bdw_inc_dir"
+ BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system boehm-gc" >&5
+$as_echo_n "checking for system boehm-gc... " >&6; }
+ save_CFLAGS=$CFLAGS
+ save_LIBS=$LIBS
+ CFLAGS="$CFLAGS $BDW_GC_CFLAGS"
+ LIBS="$LIBS $BDW_GC_LIBS"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <gc/gc.h>
+int
+main ()
+{
+GC_init()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ if test "$cross_compiling" = yes; then :
+ system_bdw_gc_found=no
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <gc/gc.h>
+ int main() {
+ GC_init();
+ return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ system_bdw_gc_found=yes
+else
+ system_bdw_gc_found=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+else
+ system_bdw_gc_found=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS=$save_CFLAGS
+ LIBS=$save_LIBS
+ if test x$enable_objc_gc = xauto && test x$system_bdw_gc_found = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: system bdw-gc not found, not building libobjc_gc" >&5
+$as_echo "$as_me: WARNING: system bdw-gc not found, not building libobjc_gc" >&2;}
+ use_bdw_gc=no
+ elif test x$enable_objc_gc = xyes && test x$system_bdw_gc_found = xno; then
+ as_fn_error "system bdw-gc required but not found" "$LINENO" 5
+ else
+ use_bdw_gc=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+ fi
+esac
+
+if test "$use_bdw_gc" = no; then
+ OBJC_GCFLAGS=''
+ OBJC_BOEHM_GC=''
+ OBJC_BOEHM_GC_INCLUDES=''
+ OBJC_BOEHM_GC_LIBS=''
+else
+ OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+ OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
+ OBJC_BOEHM_GC_INCLUDES=$BDW_GC_CFLAGS
+ OBJC_BOEHM_GC_LIBS=$BDW_GC_LIBS
+fi
+
+
+
+
+
# ------
# Output
# ------