* alloc.c: Define GC_version instead of in version.h.
* version.h: Remove.
* include/gc_version.h: Move most of version.h here.
* include/gc.h: Include gc_version.h.
* gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
* Makefile.direct, Makefile.dj, Makefile.am: Adjust for
version.h rename.
2007-12-21 Hans Boehm <Hans.Boehm@hp.com> (Really mostly russ sludge dot net)
* configure.ac: Put libatomic_ops links in build directory.
* configure: Regenerate.
* Makefile.am: Dont mention atomic_ops.c and atomic_ops_sysdeps.S
as nodist sources.
libgc_la_SOURCES += win32_threads.c
endif
-if USE_INTERNAL_LIBATOMIC_OPS
-nodist_libgc_la_SOURCES = atomic_ops.c
-endif
-
-if NEED_ATOMIC_OPS_ASM
-nodist_libgc_la_SOURCES = 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)
# headers which are not installed
# (see include/include.am for more)
#
-dist_noinst_HEADERS += version.h
# documentation which is not installed
#
SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
- include/private/gc_hdrs.h include/private/gc_priv.h \
+ include/gc_version.h include/private/gc_hdrs.h include/private/gc_priv.h \
include/private/gcconfig.h include/private/gc_pmark.h \
include/gc_inline.h include/gc_mark.h \
threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
Mac_files/datastart.c Mac_files/dataend.c \
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
add_gc_prefix.c gc_cpp.cpp \
- version.h AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
+ AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
$(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
# Work-around for DEC optimizer tail recursion elimination bug.
# The ALPHA-specific line should be removed if gcc is used.
-alloc.o: version.h
+alloc.o: include/gc_version.h
cord:
mkdir cord
./setjmp_test
./gctest
-add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/version.h
+add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/include/gc_version.h
$(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
-gcname: $(srcdir)/gcname.c $(srcdir)/version.h
+gcname: $(srcdir)/gcname.c $(srcdir)/include/gc_version.h
$(CC) -o gcname $(srcdir)/gcname.c
#We assume this is being done from source directory.
CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
SRCS= $(CSRCS) mips_sgi_mach_dep.S rs6000_mach_dep.s alpha_mach_dep.S \
- sparc_mach_dep.S include/gc.h include/gc_typed.h \
+ sparc_mach_dep.S include/gc.h include/gc_version.h include/gc_typed.h \
include/private/gc_hdrs.h include/private/gc_priv.h \
include/private/gcconfig.h include/private/gc_mark.h \
include/gc_inline.h gc.man \
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
add_gc_prefix.c README.solaris2 README.sgi README.hp README.uts \
win32_threads.c NT_THREADS_MAKEFILE gc.mak README.dj Makefile.dj \
- README.alpha README.linux README.MacOSX version.h Makefile.DLLs \
+ README.alpha README.linux README.MacOSX Makefile.DLLs \
WCC_MAKEFILE nursery.c include/gc_nursery.h include/gc_copy_descr.h
CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
# Work-around for DEC optimizer tail recursion elimination bug.
# The ALPHA-specific line should be removed if gcc is used.
-alloc.o: version.h
+alloc.o: include/gc_version.h
cord/cordbscs.o: $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
# include <stdio.h>
-# include "version.h"
+# include <gc.h>
int main(argc, argv, envp)
int argc;
" EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.",
"See source code for details." };
-# include "version.h"
+/* Version macros are now defined in gc_version.h, which is included by */
+/* gc.h, which is included by gc_priv.h". */
+
+#ifndef GC_NO_VERSION_VAR
+
+unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION);
+
+#endif /* GC_NO_VERSION_VAR */
/* some more variables */
#! /bin/sh
-# From configure.ac Revision: 1.28 .
+# From configure.ac Revision: 1.29 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for gc 7.1alpha1.
#
{ echo "$as_me:$LINENO: Using internal version of libatomic_ops" >&5
echo "$as_me: Using internal version of libatomic_ops" >&6;}
- test -e ${srcdir}/libatomic_ops \
- || ln -s ${ao_dir} ${srcdir}/libatomic_ops
+ test -e libatomic_ops \
+ || ln -s ${ao_dir} libatomic_ops
subdirs="$subdirs libatomic_ops"
- test -e ${srcdir}/atomic_ops.c \
- || ln -s ${srcdir}/libatomic_ops/src/atomic_ops.c \
- ${srcdir}/atomic_ops.c
+ test -e atomic_ops.c \
+ || ln -s libatomic_ops/src/atomic_ops.c \
+ atomic_ops.c
- test -e ${srcdir}/atomic_ops_sysdeps.S \
- || ln -s ${srcdir}/libatomic_ops/src/atomic_ops_sysdeps.S \
- ${srcdir}/atomic_ops_sysdeps.S
+ test -e atomic_ops_sysdeps.S \
+ || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \
+ atomic_ops_sysdeps.S
- GC_CFLAGS="${GC_CFLAGS} -I \$(top_srcdir)/libatomic_ops/src"
+ GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src"
maybe_libatomic_ops="libatomic_ops"
fi
AC_CONFIG_SRCDIR(gcj_mlc.c)
AC_CANONICAL_TARGET
AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.29 $)
+AC_REVISION($Revision: 1.30 $)
GC_SET_VERSION
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects nostdinc])
AM_MAINTAINER_MODE
AC_MSG_NOTICE([Using internal version of libatomic_ops])
dnl Automake does not accept shell variables in AC_CONFIG_SUBDIRS
- test -e ${srcdir}/libatomic_ops \
- || ln -s ${ao_dir} ${srcdir}/libatomic_ops
+ 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 ${srcdir}/atomic_ops.c \
- || ln -s ${srcdir}/libatomic_ops/src/atomic_ops.c \
- ${srcdir}/atomic_ops.c
+ test -e atomic_ops.c \
+ || ln -s libatomic_ops/src/atomic_ops.c \
+ atomic_ops.c
- test -e ${srcdir}/atomic_ops_sysdeps.S \
- || ln -s ${srcdir}/libatomic_ops/src/atomic_ops_sysdeps.S \
- ${srcdir}/atomic_ops_sysdeps.S
+ 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 \$(top_srcdir)/libatomic_ops/src"
+ GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src"
maybe_libatomic_ops="libatomic_ops"
])
#include <stdio.h>
-#include "version.h"
+#include <gc.h>
int main()
{
# define _GC_H
+# include "gc_version.h"
+ /* Define version numbers here to allow test on build machine */
+ /* for cross-builds. Note that this defines the header */
+ /* version number, which may or may not match that of the */
+ /* dynamic library. The GC_version variable can be used */
+ /* to obtain the latter. */
+
# include "gc_config_macros.h"
# ifdef __cplusplus
# define GC_VERSION_MINOR GC_TMP_VERSION_MINOR
# define GC_ALPHA_VERSION GC_TMP_ALPHA_VERSION
#endif
-
-
-#ifndef GC_NO_VERSION_VAR
-
-unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION);
-
-#endif /* GC_NO_VERSION_VAR */