source: trunk/src/gcc/libjava/configure.in@ 916

Last change on this file since 916 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 30.2 KB
Line 
1dnl Process this with autoconf to create configure
2AC_INIT(java/lang/System.java)
3
4# This works around the fact that libtool configuration may change LD
5# for this particular configuration, but some shells, instead of
6# keeping the changes in LD private, export them just because LD is
7# exported.
8ORIGINAL_LD_FOR_MULTILIBS=$LD
9
10AC_PROG_LN_S
11
12dnl We use these options to decide which functions to include.
13AC_ARG_WITH(target-subdir,
14[ --with-target-subdir=SUBDIR
15 configuring in a subdirectory])
16AC_ARG_WITH(cross-host,
17[ --with-cross-host=HOST configuring with a cross compiler])
18
19LIBGCJ_CONFIGURE(.)
20
21AM_CONFIG_HEADER(include/config.h gcj/libgcj-config.h)
22
23# Only use libltdl for native builds.
24if test -z "${with_cross_host}"; then
25 AC_LIBLTDL_CONVENIENCE
26 AC_LIBTOOL_DLOPEN
27 DIRLTDL=libltdl
28 AC_DEFINE(USE_LTDL)
29 # Sigh. Libtool's macro doesn't do the right thing.
30 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
31 # FIXME: this is a hack.
32 sub_auxdir="`cd $ac_aux_dir && pwd`"
33 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
34fi
35AC_SUBST(INCLTDL)
36AC_SUBST(LIBLTDL)
37AC_SUBST(DIRLTDL)
38AM_PROG_LIBTOOL
39AC_CONFIG_SUBDIRS($DIRLTDL)
40
41if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
42 COMPPATH=.
43else
44 COMPPATH=..
45fi
46AC_SUBST(COMPPATH)
47
48dnl The -no-testsuite modules omit the test subdir.
49AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
50
51dnl Should the runtime set system properties by examining the
52dnl environment variable GCJ_PROPERTIES?
53AC_ARG_ENABLE(getenv-properties,
54[ --disable-getenv-properties
55 don't set system properties from GCJ_PROPERTIES])
56
57dnl Whether GCJ_PROPERTIES is used depends on the target.
58if test -z "$enable_getenv_properties"; then
59 enable_getenv_properties=${enable_getenv_properties_default-yes}
60fi
61if test "$enable_getenv_properties" = no; then
62 AC_DEFINE(DISABLE_GETENV_PROPERTIES)
63fi
64
65dnl Whether we should use arguments to main()
66if test -z "$enable_main_args"; then
67 enable_main_args=${enable_main_args_default-yes}
68fi
69if test "$enable_main_args" = no; then
70 AC_DEFINE(DISABLE_MAIN_ARGS)
71fi
72
73
74dnl Should we use hashtable-based synchronization?
75dnl Currently works only for Linux X86/ia64
76dnl Typically faster and more space-efficient
77AC_ARG_ENABLE(hash-synchronization,
78[ --enable-hash-synchronization
79 Use global hash table for monitor locks])
80
81if test -z "$enable_hash_synchronization"; then
82 enable_hash_synchronization=$enable_hash_synchronization_default
83fi
84
85dnl configure.host sets slow_pthread_self if the synchronization code should
86dnl try to avoid pthread_self calls by caching thread IDs in a hashtable.
87if test "${slow_pthread_self}" = "yes"; then
88 AC_DEFINE(SLOW_PTHREAD_SELF)
89fi
90
91
92dnl See if the user has requested runtime debugging.
93LIBGCJDEBUG="false"
94AC_SUBST(LIBGCJDEBUG)
95AC_ARG_ENABLE(libgcj-debug,
96[ --enable-libgcj-debug enable runtime debugging code],
97 if test "$enable_libgcj_debug" = yes; then
98 AC_DEFINE(DEBUG)
99 LIBGCJDEBUG="true"
100 fi)
101
102dnl See if the user has the interpreter included.
103AC_ARG_ENABLE(interpreter,
104[ --enable-interpreter enable interpreter],
105 if test "$enable_interpreter" = yes; then
106 # This can also be set in configure.host.
107 libgcj_interpreter=yes
108 elif test "$enable_interpreter" = no; then
109 libgcj_interpreter=no
110 fi)
111
112if test "$libgcj_interpreter" = yes; then
113 AC_DEFINE(INTERPRETER)
114fi
115
116AC_MSG_CHECKING([for exception model to use])
117AC_LANG_SAVE
118AC_LANG_CPLUSPLUS
119AC_ARG_ENABLE(sjlj-exceptions,
120[ --enable-sjlj-exceptions force use of builtin_setjmp for exceptions],
121[:],
122[dnl Botheration. Now we've got to detect the exception model.
123dnl Link tests against libgcc.a are problematic since -- at least
124dnl as of this writing -- we've not been given proper -L bits for
125dnl single-tree newlib and libgloss.
126dnl
127dnl This is what AC_TRY_COMPILE would do if it didn't delete the
128dnl conftest files before we got a change to grep them first.
129cat > conftest.$ac_ext << EOF
130[#]line __oline__ "configure"
131struct S { ~S(); };
132void bar();
133void foo()
134{