From 6d651f61d1690ffae0528830151159f21d27de26 Mon Sep 17 00:00:00 2001 From: ivmai Date: Wed, 30 Sep 2009 08:42:33 +0000 Subject: [PATCH] 2009-09-30 Ivan Maidanski (really Petter Urkedal) * configure.ac: Rewrite the tests for external or internal libatomic_ops. * configure.ac: In particular, drop the symbolic links. Add option --with-libatomic-ops for forced selection. * Makefile.am: Adjust the path of source files from libatomic_ops to not use the links. * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will be empty if we use the bundled AO sources. * configure: Regenerate. * Makefile.in: Ditto. --- ChangeLog | 13 +++++ Makefile.am | 10 ++-- Makefile.in | 91 +++++++++++++++++--------------- configure | 143 ++++++++++++++++++++++++++------------------------- configure.ac | 82 +++++++++++------------------ 5 files changed, 172 insertions(+), 167 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d853d3d..5edcad07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-09-30 Ivan Maidanski (really Petter Urkedal) + + * configure.ac: Rewrite the tests for external or internal + libatomic_ops. + * configure.ac: In particular, drop the symbolic links. Add option + --with-libatomic-ops for forced selection. + * Makefile.am: Adjust the path of source files from libatomic_ops + to not use the links. + * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will + be empty if we use the bundled AO sources. + * configure: Regenerate. + * Makefile.in: Ditto. + 2009-09-29 Ivan Maidanski * Makefile.am: Strip version suffix for libatomic_ops directory. diff --git a/Makefile.am b/Makefile.am index 46fa7a8b..a473cdb0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,10 @@ SUBDIRS = AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include +if USE_INTERNAL_LIBATOMIC_OPS +AM_CPPFLAGS += -I$(top_builddir)/libatomic_ops/src \ + -I$(top_srcdir)/libatomic_ops/src +endif # Initialize variables so that we can declare files locally. EXTRA_DIST = @@ -74,16 +78,16 @@ libgc_la_SOURCES += win32_threads.c endif if USE_INTERNAL_LIBATOMIC_OPS -nodist_libgc_la_SOURCES = ./atomic_ops.c +nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c endif if NEED_ATOMIC_OPS_ASM -nodist_libgc_la_SOURCES = ./atomic_ops_sysdeps.S +nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S endif # Include THREADDLLIBS here to ensure that the correct versions of # linuxthread semaphore functions get linked: -libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) +libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS) libgc_la_DEPENDENCIES = @addobjs@ libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined diff --git a/Makefile.in b/Makefile.in index ec604c92..a8174838 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,20 +95,23 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@USE_INTERNAL_LIBATOMIC_OPS_TRUE@am__append_1 = -I$(top_builddir)/libatomic_ops/src \ +@USE_INTERNAL_LIBATOMIC_OPS_TRUE@ -I$(top_srcdir)/libatomic_ops/src + check_PROGRAMS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \ smashtest$(EXEEXT) hugetest$(EXEEXT) $(am__EXEEXT_1) \ $(am__EXEEXT_2) $(am__EXEEXT_3) # C Library: Architecture Dependent # --------------------------------- -@PTHREADS_TRUE@am__append_1 = pthread_support.c pthread_stop_world.c -@DARWIN_THREADS_TRUE@am__append_2 = darwin_stop_world.c -@WIN32_THREADS_TRUE@am__append_3 = win32_threads.c +@PTHREADS_TRUE@am__append_2 = pthread_support.c pthread_stop_world.c +@DARWIN_THREADS_TRUE@am__append_3 = darwin_stop_world.c +@WIN32_THREADS_TRUE@am__append_4 = win32_threads.c # C++ Interface # ------------- -@CPLUSPLUS_TRUE@am__append_4 = libgccpp.la -@CPLUSPLUS_TRUE@am__append_5 = include/gc_cpp.h include/gc_allocator.h +@CPLUSPLUS_TRUE@am__append_5 = libgccpp.la +@CPLUSPLUS_TRUE@am__append_6 = include/gc_cpp.h include/gc_allocator.h DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \ $(dist_noinst_HEADERS) $(dist_noinst_SCRIPTS) \ $(dist_pkgdata_DATA) $(include_HEADERS) $(srcdir)/Makefile.am \ @@ -119,12 +122,12 @@ DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \ $(top_srcdir)/include/private/config.h.in ChangeLog compile \ config.guess config.sub depcomp install-sh ltmain.sh missing \ mkinstalldirs -@KEEP_BACK_PTRS_TRUE@am__append_6 = tracetest$(EXEEXT) -@KEEP_BACK_PTRS_TRUE@am__append_7 = tracetest -@THREADS_TRUE@am__append_8 = threadleaktest$(EXEEXT) -@THREADS_TRUE@am__append_9 = threadleaktest -@CPLUSPLUS_TRUE@am__append_10 = test_cpp$(EXEEXT) -@CPLUSPLUS_TRUE@am__append_11 = test_cpp +@KEEP_BACK_PTRS_TRUE@am__append_7 = tracetest$(EXEEXT) +@KEEP_BACK_PTRS_TRUE@am__append_8 = tracetest +@THREADS_TRUE@am__append_9 = threadleaktest$(EXEEXT) +@THREADS_TRUE@am__append_10 = threadleaktest +@CPLUSPLUS_TRUE@am__append_11 = test_cpp$(EXEEXT) +@CPLUSPLUS_TRUE@am__append_12 = test_cpp subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -170,9 +173,8 @@ am_libgc_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo checksums.lo \ real_malloc.lo reclaim.lo specific.lo stubborn.lo typd_mlc.lo \ backgraph.lo thread_local_alloc.lo $(am__objects_1) \ $(am__objects_2) $(am__objects_3) -@NEED_ATOMIC_OPS_ASM_FALSE@@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_OBJECTS = ./atomic_ops.lo -@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_OBJECTS = \ -@NEED_ATOMIC_OPS_ASM_TRUE@ ./atomic_ops_sysdeps.lo +@NEED_ATOMIC_OPS_ASM_FALSE@@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_OBJECTS = libatomic_ops/src/atomic_ops.lo +@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_OBJECTS = libatomic_ops/src/atomic_ops_sysdeps.lo libgc_la_OBJECTS = $(am_libgc_la_OBJECTS) $(nodist_libgc_la_OBJECTS) @CPLUSPLUS_TRUE@libgccpp_la_DEPENDENCIES = ./libgc.la am__libgccpp_la_SOURCES_DIST = gc_cpp.cc @@ -290,6 +292,7 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ATOMIC_OPS_LIBS = @ATOMIC_OPS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -392,7 +395,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -atomic_ops_libs = @atomic_ops_libs@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -441,7 +443,8 @@ target_vendor = @target_vendor@ # SUBDIRS = # endif SUBDIRS = -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ + $(am__append_1) # Initialize variables so that we can declare files locally. @@ -482,14 +485,14 @@ EXTRA_DIST = gc_cpp.cpp README.QUICK BCC_MAKEFILE NT_MAKEFILE \ # C Library # --------- -lib_LTLIBRARIES = libgc.la $(am__append_4) libcord.la +lib_LTLIBRARIES = libgc.la $(am__append_5) libcord.la # unprefixed header include_HEADERS = include/extra/gc.h include/extra/gc_cpp.h # installed headers # -pkginclude_HEADERS = $(am__append_5) include/gc.h include/gc_typed.h \ +pkginclude_HEADERS = $(am__append_6) include/gc.h include/gc_typed.h \ include/gc_inline.h include/gc_mark.h include/gc_cpp.h \ include/weakpointer.h include/new_gc_alloc.h \ include/gc_allocator.h include/gc_backptr.h include/gc_gcj.h \ @@ -510,8 +513,8 @@ dist_noinst_HEADERS = include/private/gc_hdrs.h \ include/private/thread_local_alloc.h include/cord.h \ include/ec.h include/javaxfc.h TESTS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \ - smashtest$(EXEEXT) hugetest$(EXEEXT) $(am__append_6) \ - $(am__append_8) $(am__append_10) + smashtest$(EXEEXT) hugetest$(EXEEXT) $(am__append_7) \ + $(am__append_9) $(am__append_11) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = bdw-gc.pc libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ @@ -519,14 +522,14 @@ libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c \ os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ specific.c stubborn.c typd_mlc.c backgraph.c \ - thread_local_alloc.c $(am__append_1) $(am__append_2) \ - $(am__append_3) -@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_SOURCES = ./atomic_ops_sysdeps.S -@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_SOURCES = ./atomic_ops.c + thread_local_alloc.c $(am__append_2) $(am__append_3) \ + $(am__append_4) +@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S +@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c # Include THREADDLLIBS here to ensure that the correct versions of # linuxthread semaphore functions get linked: -libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) +libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS) libgc_la_DEPENDENCIES = @addobjs@ libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \ @@ -721,14 +724,17 @@ cord/cordtest.lo: cord/$(am__dirstamp) cord/$(DEPDIR)/$(am__dirstamp) cord/cordxtra.lo: cord/$(am__dirstamp) cord/$(DEPDIR)/$(am__dirstamp) libcord.la: $(libcord_la_OBJECTS) $(libcord_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libcord_la_LDFLAGS) $(libcord_la_OBJECTS) $(libcord_la_LIBADD) $(LIBS) -./$(am__dirstamp): - @$(mkdir_p) . - @: > ./$(am__dirstamp) -$(DEPDIR)/$(am__dirstamp): - @$(mkdir_p) ./$(DEPDIR) - @: > $(DEPDIR)/$(am__dirstamp) -./atomic_ops_sysdeps.lo: ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) -./atomic_ops.lo: ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) +libatomic_ops/src/$(am__dirstamp): + @$(mkdir_p) libatomic_ops/src + @: > libatomic_ops/src/$(am__dirstamp) +libatomic_ops/src/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) libatomic_ops/src/$(DEPDIR) + @: > libatomic_ops/src/$(DEPDIR)/$(am__dirstamp) +libatomic_ops/src/atomic_ops_sysdeps.lo: \ + libatomic_ops/src/$(am__dirstamp) \ + libatomic_ops/src/$(DEPDIR)/$(am__dirstamp) +libatomic_ops/src/atomic_ops.lo: libatomic_ops/src/$(am__dirstamp) \ + libatomic_ops/src/$(DEPDIR)/$(am__dirstamp) libgc.la: $(libgc_la_OBJECTS) $(libgc_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgc_la_LDFLAGS) $(libgc_la_OBJECTS) $(libgc_la_LIBADD) $(LIBS) libgccpp.la: $(libgccpp_la_OBJECTS) $(libgccpp_la_DEPENDENCIES) @@ -789,10 +795,6 @@ tracetest$(EXEEXT): $(tracetest_OBJECTS) $(tracetest_DEPENDENCIES) mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f ./atomic_ops.$(OBJEXT) - -rm -f ./atomic_ops.lo - -rm -f ./atomic_ops_sysdeps.$(OBJEXT) - -rm -f ./atomic_ops_sysdeps.lo -rm -f cord/cordbscs.$(OBJEXT) -rm -f cord/cordbscs.lo -rm -f cord/cordprnt.$(OBJEXT) @@ -801,6 +803,10 @@ mostlyclean-compile: -rm -f cord/cordtest.lo -rm -f cord/cordxtra.$(OBJEXT) -rm -f cord/cordxtra.lo + -rm -f libatomic_ops/src/atomic_ops.$(OBJEXT) + -rm -f libatomic_ops/src/atomic_ops.lo + -rm -f libatomic_ops/src/atomic_ops_sysdeps.$(OBJEXT) + -rm -f libatomic_ops/src/atomic_ops_sysdeps.lo -rm -f tests/huge_test.$(OBJEXT) -rm -f tests/leak_test.$(OBJEXT) -rm -f tests/middle.$(OBJEXT) @@ -815,7 +821,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allchblk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backgraph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blacklst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksums.Plo@am__quote@ @@ -850,6 +855,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordprnt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordxtra.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libatomic_ops/src/$(DEPDIR)/atomic_ops.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/huge_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/leak_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/middle.Po@am__quote@ @@ -925,6 +931,7 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -rm -rf cord/.libs cord/_libs + -rm -rf libatomic_ops/src/.libs libatomic_ops/src/_libs distclean-libtool: -rm -f libtool @@ -1375,12 +1382,12 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -rm -f ./$(am__dirstamp) -rm -f cord/$(DEPDIR)/$(am__dirstamp) -rm -f cord/$(am__dirstamp) + -rm -f libatomic_ops/src/$(DEPDIR)/$(am__dirstamp) + -rm -f libatomic_ops/src/$(am__dirstamp) -rm -f tests/$(DEPDIR)/$(am__dirstamp) -rm -f tests/$(am__dirstamp) - -test -z "$(DEPDIR)/$(am__dirstamp)" || rm -f $(DEPDIR)/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1392,7 +1399,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) cord/$(DEPDIR) tests/$(DEPDIR) + -rm -rf ./$(DEPDIR) cord/$(DEPDIR) libatomic_ops/src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -1421,7 +1428,7 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) cord/$(DEPDIR) tests/$(DEPDIR) + -rm -rf ./$(DEPDIR) cord/$(DEPDIR) libatomic_ops/src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/configure b/configure index e24df3d5..9c8bad60 100755 --- a/configure +++ b/configure @@ -467,7 +467,7 @@ ac_includes_default="\ #endif" ac_subdirs_all="$ac_subdirs_all libatomic_ops" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CCAS CCASFLAGS AR ac_ct_AR RANLIB ac_ct_RANLIB GC_CFLAGS THREADDLLIBS THREADS_TRUE THREADS_FALSE PTHREADS_TRUE PTHREADS_FALSE DARWIN_THREADS_TRUE DARWIN_THREADS_FALSE WIN32_THREADS_TRUE WIN32_THREADS_FALSE COMPILER_XLC_TRUE COMPILER_XLC_FALSE AVOID_CPP_LIB_TRUE AVOID_CPP_LIB_FALSE extra_ldflags_libgc EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE INCLUDES CXXINCLUDES addobjs addlibs SED EGREP LN_S ECHO CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ENABLE_GCJ_SUPPORT_TRUE ENABLE_GCJ_SUPPORT_FALSE KEEP_BACK_PTRS_TRUE KEEP_BACK_PTRS_FALSE UNWINDLIBS USE_LIBDIR_TRUE USE_LIBDIR_FALSE subdirs USE_INTERNAL_LIBATOMIC_OPS_TRUE USE_INTERNAL_LIBATOMIC_OPS_FALSE NEED_ATOMIC_OPS_ASM_TRUE NEED_ATOMIC_OPS_ASM_FALSE atomic_ops_libs LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CCAS CCASFLAGS AR ac_ct_AR RANLIB ac_ct_RANLIB GC_CFLAGS THREADDLLIBS THREADS_TRUE THREADS_FALSE PTHREADS_TRUE PTHREADS_FALSE DARWIN_THREADS_TRUE DARWIN_THREADS_FALSE WIN32_THREADS_TRUE WIN32_THREADS_FALSE COMPILER_XLC_TRUE COMPILER_XLC_FALSE AVOID_CPP_LIB_TRUE AVOID_CPP_LIB_FALSE extra_ldflags_libgc EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE INCLUDES CXXINCLUDES addobjs addlibs SED EGREP LN_S ECHO CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ENABLE_GCJ_SUPPORT_TRUE ENABLE_GCJ_SUPPORT_FALSE KEEP_BACK_PTRS_TRUE KEEP_BACK_PTRS_FALSE UNWINDLIBS USE_LIBDIR_TRUE USE_LIBDIR_FALSE ATOMIC_OPS_LIBS subdirs USE_INTERNAL_LIBATOMIC_OPS_TRUE USE_INTERNAL_LIBATOMIC_OPS_FALSE NEED_ATOMIC_OPS_ASM_TRUE NEED_ATOMIC_OPS_ASM_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1076,6 +1076,8 @@ Optional Packages: --with-target-subdir=SUBDIR configuring with a cross compiler --with-cross-host=HOST configuring with a cross compiler + --with-libatomic-ops=yes|no|check + Use a pre-installed libatomic_ops? (default: check) Some influential environment variables: CC C compiler command @@ -6240,7 +6242,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6243 "configure"' > conftest.$ac_ext + echo '#line 6245 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7375,7 +7377,7 @@ fi # Provide some information about the compiler. -echo "$as_me:7378:" \ +echo "$as_me:7380:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -8438,11 +8440,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8441: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8443: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8445: \$? = $ac_status" >&5 + echo "$as_me:8447: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8706,11 +8708,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8709: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8711: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8713: \$? = $ac_status" >&5 + echo "$as_me:8715: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8810,11 +8812,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8813: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8815: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8817: \$? = $ac_status" >&5 + echo "$as_me:8819: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10279,7 +10281,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 10282 "configure"' > conftest.$ac_ext + echo '#line 10284 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11176,7 +11178,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13624: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13626: \$? = $ac_status" >&5 + echo "$as_me:13628: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13723,11 +13725,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13726: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13728: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13730: \$? = $ac_status" >&5 + echo "$as_me:13732: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14259,7 +14261,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 14262 "configure"' > conftest.$ac_ext + echo '#line 14264 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15317,11 +15319,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15320: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15322: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15324: \$? = $ac_status" >&5 + echo "$as_me:15326: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15421,11 +15423,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15424: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15426: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15428: \$? = $ac_status" >&5 + echo "$as_me:15430: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16870,7 +16872,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 16873 "configure"' > conftest.$ac_ext + echo '#line 16875 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -17648,11 +17650,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17653: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17655: \$? = $ac_status" >&5 + echo "$as_me:17657: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17916,11 +17918,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17921: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17923: \$? = $ac_status" >&5 + echo "$as_me:17925: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18020,11 +18022,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18025: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18027: \$? = $ac_status" >&5 + echo "$as_me:18029: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19489,7 +19491,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 19492 "configure"' > conftest.$ac_ext + echo '#line 19494 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -21262,9 +21264,24 @@ fi +# Atomic Ops +# ---------- -atomic_ops_libs=-latomic_ops -if test "${ac_cv_header_atomic_ops_h+set}" = set; then +# Do we want to use an external libatomic_ops? By default use it if it's +# found. + +# Check whether --with-libatomic-ops or --without-libatomic-ops was given. +if test "${with_libatomic_ops+set}" = set; then + withval="$with_libatomic_ops" + +else + with_libatomic_ops=check +fi; + +# Check for an external libatomic_ops if the answer was yes or check. If not +# found, fail on yes, and convert check to no. +if test x"$with_libatomic_ops" != xno; then + if test "${ac_cv_header_atomic_ops_h+set}" = set; then echo "$as_me:$LINENO: checking for atomic_ops.h" >&5 echo $ECHO_N "checking for atomic_ops.h... $ECHO_C" >&6 if test "${ac_cv_header_atomic_ops_h+set}" = set; then @@ -21402,57 +21419,42 @@ echo "${ECHO_T}$ac_cv_header_atomic_ops_h" >&6 fi if test $ac_cv_header_atomic_ops_h = yes; then - { echo "$as_me:$LINENO: Using pre-installed libatomic_ops" >&5 -echo "$as_me: Using pre-installed libatomic_ops" >&6;} -else - ao_dir= - for candidate in ${srcdir}/libatomic_ops*; do - case $candidate in - *.tar.gz) - ;; - *install) - ;; - *) - if test -e "$candidate"; then - ao_dir="$candidate" - fi - ;; - esac - done - if test -z "$ao_dir"; then - { { echo "$as_me:$LINENO: error: Missig libatomic_ops." >&5 -echo "$as_me: error: Missig libatomic_ops." >&2;} + : +else + if test x"$with_libatomic_ops" != xcheck; then + { { echo "$as_me:$LINENO: error: A pre-installed libatomic_ops was not found." >&5 +echo "$as_me: error: A pre-installed libatomic_ops was not found." >&2;} { (exit 1); exit 1; }; } - fi - ao_version="${ao_dir#*libatomic_ops-}" - { echo "$as_me:$LINENO: Using internal version of libatomic_ops" >&5 -echo "$as_me: Using internal version of libatomic_ops" >&6;} +fi - test -e libatomic_ops \ - || ln -s ${ao_dir} libatomic_ops + with_libatomic_ops=no +fi -subdirs="$subdirs libatomic_ops" +fi - test -e atomic_ops.c \ - || ln -s libatomic_ops/src/atomic_ops.c \ - atomic_ops.c +# Finally, emit the definitions for bundled or pre-installed AO. +echo "$as_me:$LINENO: checking which libatomic_ops to use" >&5 +echo $ECHO_N "checking which libatomic_ops to use... $ECHO_C" >&6 +if test x"$with_libatomic_ops" != xno; then + echo "$as_me:$LINENO: result: pre-installed" >&5 +echo "${ECHO_T}pre-installed" >&6 + ATOMIC_OPS_LIBS="-latomic_ops" - test -e atomic_ops_sysdeps.S \ - || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \ - atomic_ops_sysdeps.S +else + echo "$as_me:$LINENO: result: bundled" >&5 +echo "${ECHO_T}bundled" >&6 - GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src" - maybe_libatomic_ops="libatomic_ops" -fi +subdirs="$subdirs libatomic_ops" +fi -if test -n "$maybe_libatomic_ops" -a "$THREADS" != "none"; then +if test x$with_libatomic_ops = xno -a x"$THREADS" != xnone; then USE_INTERNAL_LIBATOMIC_OPS_TRUE= USE_INTERNAL_LIBATOMIC_OPS_FALSE='#' else @@ -21462,7 +21464,7 @@ fi -if test -n "$maybe_libatomic_ops" -a x$need_atomic_ops_asm = xtrue; then +if test x$with_libatomic_ops = xno -a x$need_atomic_ops_asm = xtrue; then NEED_ATOMIC_OPS_ASM_TRUE= NEED_ATOMIC_OPS_ASM_FALSE='#' else @@ -21472,7 +21474,6 @@ fi - ac_config_files="$ac_config_files Makefile bdw-gc.pc" @@ -22327,12 +22328,12 @@ s,@KEEP_BACK_PTRS_FALSE@,$KEEP_BACK_PTRS_FALSE,;t t s,@UNWINDLIBS@,$UNWINDLIBS,;t t s,@USE_LIBDIR_TRUE@,$USE_LIBDIR_TRUE,;t t s,@USE_LIBDIR_FALSE@,$USE_LIBDIR_FALSE,;t t +s,@ATOMIC_OPS_LIBS@,$ATOMIC_OPS_LIBS,;t t s,@subdirs@,$subdirs,;t t s,@USE_INTERNAL_LIBATOMIC_OPS_TRUE@,$USE_INTERNAL_LIBATOMIC_OPS_TRUE,;t t s,@USE_INTERNAL_LIBATOMIC_OPS_FALSE@,$USE_INTERNAL_LIBATOMIC_OPS_FALSE,;t t s,@NEED_ATOMIC_OPS_ASM_TRUE@,$NEED_ATOMIC_OPS_ASM_TRUE,;t t s,@NEED_ATOMIC_OPS_ASM_FALSE@,$NEED_ATOMIC_OPS_ASM_FALSE,;t t -s,@atomic_ops_libs@,$atomic_ops_libs,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.ac b/configure.ac index ff1e07b3..f1dcd65e 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_INIT(gc,7.2alpha3,Hans.Boehm@hp.com) AC_CONFIG_SRCDIR(gcj_mlc.c) AC_CANONICAL_TARGET AC_PREREQ(2.53) -AC_REVISION($Revision: 1.50 $) +AC_REVISION($Revision: 1.51 $) GC_SET_VERSION AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects nostdinc]) AM_CONFIG_HEADER([include/private/config.h]) @@ -687,57 +687,37 @@ fi AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host") -dnl Atomic Ops -dnl ---------- - -atomic_ops_libs=-latomic_ops -AC_CHECK_HEADER(atomic_ops.h, - [ AC_MSG_NOTICE([Using pre-installed libatomic_ops]) ], - [ ao_dir= - for candidate in ${srcdir}/libatomic_ops*; do - case $candidate in - *.tar.gz) - ;; - *install) - dnl generated by alternate Makefile. - ;; - *) - if test -e "$candidate"; then - ao_dir="$candidate" - fi - ;; - esac - done - if test -z "$ao_dir"; then - AC_MSG_ERROR([Missig libatomic_ops.]) - fi - ao_version="${ao_dir#*libatomic_ops-}" - AC_MSG_NOTICE([Using internal version of libatomic_ops]) - - dnl Automake does not accept shell variables in AC_CONFIG_SUBDIRS - test -e libatomic_ops \ - || ln -s ${ao_dir} libatomic_ops - AC_CONFIG_SUBDIRS(libatomic_ops) - - dnl Also copy the source files to be linked in. - test -e atomic_ops.c \ - || ln -s libatomic_ops/src/atomic_ops.c \ - atomic_ops.c - - test -e atomic_ops_sysdeps.S \ - || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \ - atomic_ops_sysdeps.S - - dnl This gets the source include files, which is often close enough. - dnl It also makes atomic_ops_sysdeps.S assemble. - GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src" - maybe_libatomic_ops="libatomic_ops" +# Atomic Ops +# ---------- + +# Do we want to use an external libatomic_ops? By default use it if it's +# found. +AC_ARG_WITH([libatomic-ops], + [AS_HELP_STRING([--with-libatomic-ops[=yes|no|check]], + [Use a pre-installed libatomic_ops? (default: check)])], + [], [with_libatomic_ops=check]) + +# Check for an external libatomic_ops if the answer was yes or check. If not +# found, fail on yes, and convert check to no. +AS_IF([test x"$with_libatomic_ops" != xno], + [ AC_CHECK_HEADER([atomic_ops.h], [], + [ AS_IF([test x"$with_libatomic_ops" != xcheck], + [AC_MSG_ERROR([A pre-installed libatomic_ops was not found.])]) + with_libatomic_ops=no ]) ]) + +# Finally, emit the definitions for bundled or pre-installed AO. +AC_MSG_CHECKING([which libatomic_ops to use]) +AS_IF([test x"$with_libatomic_ops" != xno], + [ AC_MSG_RESULT([pre-installed]) + ATOMIC_OPS_LIBS="-latomic_ops" + AC_SUBST([ATOMIC_OPS_LIBS]) ], + [ AC_MSG_RESULT([bundled]) + AC_CONFIG_SUBDIRS([libatomic_ops]) ]) - -AM_CONDITIONAL(USE_INTERNAL_LIBATOMIC_OPS, - test -n "$maybe_libatomic_ops" -a "$THREADS" != "none") -AM_CONDITIONAL(NEED_ATOMIC_OPS_ASM, test -n "$maybe_libatomic_ops" -a x$need_atomic_ops_asm = xtrue) -AC_SUBST(atomic_ops_libs) +AM_CONDITIONAL([USE_INTERNAL_LIBATOMIC_OPS], + [test x$with_libatomic_ops = xno -a x"$THREADS" != xnone]) +AM_CONDITIONAL([NEED_ATOMIC_OPS_ASM], + [test x$with_libatomic_ops = xno -a x$need_atomic_ops_asm = xtrue]) dnl Produce the Files dnl ----------------- -- 2.40.0