X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libobjc%2Fconfigure;h=8c07356af0c2648b804661b5b8cc97f90f0dbd6c;hb=1e9bf3d9c7384820a561f0a55b6a8101b9983fa2;hp=ffa3a88cdd4c717eba10b38b464f979151a8d5ed;hpb=a2a8dcb195e20f33c8f5e4bbc0b1c61b2f9ad428;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libobjc/configure b/libobjc/configure index ffa3a88cdd4..8c07356af0c 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -631,6 +631,7 @@ RANLIB AR AS extra_ldflags_libobjc +lt_host_flags OBJEXT EXEEXT ac_ct_CC @@ -655,6 +656,7 @@ host multi_basedir OBJC_BOEHM_GC_INCLUDES OBJC_BOEHM_GC +OBJC_GCFLAGS VERSION target_subdir host_subdir @@ -2272,7 +2274,7 @@ target_subdir=${target_noncanonical} # We need the following definitions because AC_PROG_LIBTOOL relies on them PACKAGE=libobjc # Version is pulled out to make it a bit easier to change using sed. -VERSION=2:0:0 +VERSION=4:0:0 # This works around the fact that libtool configuration may change LD @@ -2319,21 +2321,31 @@ $as_echo "$version_specific_libs" >&6; } 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_BOEHM_GC=libobjc_gc.la + 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' + case "${host}" in + alpha*-dec-osf*) + # boehm-gc headers include , which needs to be compiled + # with -pthread on Tru64 UNIX. + OBJC_GCFLAGS="${OBJC_GCFLAGS} -pthread" + ;; + esac ;; esac else - OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES='' + OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES='' fi + # ----------- # Directories # ----------- @@ -3318,14 +3330,36 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # extra LD Flags which are required for targets + + + +case $host in + *-cygwin* | *-mingw*) + # 'host' will be top-level target in the case of a target lib, + # we must compare to with_cross_host to decide if this is a native + # or cross-compiler and select where to install dlls appropriately. + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; + else + lt_host_flags='-no-undefined -bindir "$(bindir)"'; + fi + ;; + *) + lt_host_flags= + ;; +esac + + + case "${host}" in *-darwin*) # Darwin needs -single_module when linking libobjc - extra_ldflags_libobjc=-Wl,-single_module + extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module' ;; *-cygwin*|*-mingw*) # Tell libtool to build DLLs on Windows - extra_ldflags_libobjc='-no-undefined -bindir $(bindir)' + extra_ldflags_libobjc='$(lt_host_flags)' ;; esac @@ -8762,10 +8796,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -8778,7 +8808,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9687,10 +9717,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -9698,7 +9724,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9716,7 +9742,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -10568,7 +10594,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10571 "configure" +#line 10597 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10674,7 +10700,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10677 "configure" +#line 10703 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11222,18 +11248,6 @@ done # Miscellanea # ----------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread model used by GCC" >&5 -$as_echo_n "checking for thread model used by GCC... " >&6; } -target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5 -$as_echo "$target_thread_file" >&6; } - -if test $target_thread_file != single; then - -$as_echo "#define HAVE_GTHR_DEFAULT 1" >>confdefs.h - -fi - # Check if we have thread-local storage @@ -11457,7 +11471,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 11460 "configure" +#line 11474 "configure" @interface Frob @end @implementation Frob