| 1 | dnl aclocal.m4 generated automatically by aclocal 1.4
|
|---|
| 2 |
|
|---|
| 3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
|---|
| 4 | dnl This file is free software; the Free Software Foundation
|
|---|
| 5 | dnl gives unlimited permission to copy and/or distribute it,
|
|---|
| 6 | dnl with or without modifications, as long as this notice is preserved.
|
|---|
| 7 |
|
|---|
| 8 | dnl This program is distributed in the hope that it will be useful,
|
|---|
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|---|
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|---|
| 11 | dnl PARTICULAR PURPOSE.
|
|---|
| 12 |
|
|---|
| 13 | AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
|---|
| 14 | [changequote(<<, >>)dnl
|
|---|
| 15 | dnl The name to #define.
|
|---|
| 16 | define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
|---|
| 17 | dnl The cache variable name.
|
|---|
| 18 | define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
|---|
| 19 | changequote([, ])dnl
|
|---|
| 20 | AC_MSG_CHECKING(size of $1)
|
|---|
| 21 | AC_CACHE_VAL(AC_CV_NAME,
|
|---|
| 22 | [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
|---|
| 23 | AC_TRY_COMPILE([#include "confdefs.h"
|
|---|
| 24 | #include <sys/types.h>
|
|---|
| 25 | $2
|
|---|
| 26 | ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
|---|
| 27 | if test x$AC_CV_NAME != x ; then break; fi
|
|---|
| 28 | done
|
|---|
| 29 | ])
|
|---|
| 30 | if test x$AC_CV_NAME = x ; then
|
|---|
| 31 | AC_MSG_ERROR([cannot determine a size for $1])
|
|---|
| 32 | fi
|
|---|
| 33 | AC_MSG_RESULT($AC_CV_NAME)
|
|---|
| 34 | AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
|---|
| 35 | undefine([AC_TYPE_NAME])dnl
|
|---|
| 36 | undefine([AC_CV_NAME])dnl
|
|---|
| 37 | ])
|
|---|
| 38 |
|
|---|
| 39 | AC_DEFUN(LIBGCJ_CONFIGURE,
|
|---|
| 40 | [
|
|---|
| 41 | dnl Default to --enable-multilib
|
|---|
| 42 | AC_ARG_ENABLE(multilib,
|
|---|
| 43 | [ --enable-multilib build many library versions (default)],
|
|---|
| 44 | [case "${enableval}" in
|
|---|
| 45 | yes) multilib=yes ;;
|
|---|
| 46 | no) multilib=no ;;
|
|---|
| 47 | *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
|---|
| 48 | esac], [multilib=yes])dnl
|
|---|
| 49 |
|
|---|
| 50 | dnl We may get other options which we don't document:
|
|---|
| 51 | dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
|---|
| 52 |
|
|---|
| 53 | # When building with srcdir == objdir, links to the source files will
|
|---|
| 54 | # be created in directories within the target_subdir. We have to
|
|---|
| 55 | # adjust toplevel_srcdir accordingly, so that configure finds
|
|---|
| 56 | # install-sh and other auxiliary files that live in the top-level
|
|---|
| 57 | # source directory.
|
|---|
| 58 | if test "${srcdir}" = "."; then
|
|---|
| 59 | if test -z "${with_target_subdir}"; then
|
|---|
| 60 | toprel=".."
|
|---|
| 61 | else
|
|---|
| 62 | if test "${with_target_subdir}" != "."; then
|
|---|
| 63 | toprel="${with_multisrctop}../.."
|
|---|
| 64 | else
|
|---|
| 65 | toprel="${with_multisrctop}.."
|
|---|
| 66 | fi
|
|---|
| 67 | fi
|
|---|
| 68 | else
|
|---|
| 69 | toprel=".."
|
|---|
| 70 | fi
|
|---|
| 71 |
|
|---|
| 72 | libgcj_basedir=$srcdir/$toprel/$1/libjava
|
|---|
| 73 | AC_SUBST(libgcj_basedir)
|
|---|
| 74 |
|
|---|
| 75 | AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
|
|---|
| 76 | if :; then :; else
|
|---|
| 77 | # This overrides the previous occurrence for automake, but not for
|
|---|
| 78 | # autoconf, which is exactly what we want.
|
|---|
| 79 | AC_CONFIG_AUX_DIR(..)
|
|---|
| 80 | fi
|
|---|
| 81 |
|
|---|
| 82 | # This works around an automake problem.
|
|---|
| 83 | mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
|
|---|
| 84 | AC_SUBST(mkinstalldirs)
|
|---|
| 85 |
|
|---|
| 86 | AC_CANONICAL_SYSTEM
|
|---|
| 87 |
|
|---|
| 88 | dnl This shouldn't be needed, as long as top-level dependencies are
|
|---|
| 89 | dnl defined correctly and shared-library paths are set up so that
|
|---|
| 90 | dnl execution tests succeed. FIXME.
|
|---|
| 91 | define([AC_PROG_CC_WORKS],[])
|
|---|
| 92 | define([AC_PROG_CXX_WORKS],[])
|
|---|
| 93 |
|
|---|
| 94 | AC_PROG_CC
|
|---|
| 95 |
|
|---|
| 96 | # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
|
|---|
| 97 | # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
|
|---|
| 98 | # different definition of CXX than other directories, since we don't
|
|---|
| 99 | # depend on libstdc++-v3 having already been built.
|
|---|
| 100 | AC_DEFUN(LIB_AC_PROG_CXX,
|
|---|
| 101 | [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
|
|---|
| 102 | dnl Fool anybody using AC_PROG_CXX.
|
|---|
| 103 | AC_PROVIDE([AC_PROG_CXX])
|
|---|
| 104 | # Use glibjava_CXX so that we do not cause CXX to be cached with the
|
|---|
| 105 | # flags that come in CXX while configuring libjava. They're different
|
|---|
| 106 | # from those used for all other target libraries. If CXX is set in
|
|---|
| 107 | # the environment, respect that here.
|
|---|
| 108 | glibjava_CXX=$CXX
|
|---|
| 109 | AC_CHECK_PROGS(glibjava_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
|
|---|
| 110 | AC_SUBST(CXX)
|
|---|
| 111 | CXX=$glibjava_CXX
|
|---|
| 112 | test -z "$glibjava_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
|
|---|
| 113 |
|
|---|
| 114 | AC_PROG_CXX_GNU
|
|---|
| 115 |
|
|---|
| 116 | if test $ac_cv_prog_gxx = yes; then
|
|---|
| 117 | GXX=yes
|
|---|
| 118 | dnl Check whether -g works, even if CXXFLAGS is set, in case the package
|
|---|
| 119 | dnl plays around with CXXFLAGS (such as to build both debugging and
|
|---|
| 120 | dnl normal versions of a library), tasteless as that idea is.
|
|---|
| 121 | ac_test_CXXFLAGS="${CXXFLAGS+set}"
|
|---|
| 122 | ac_save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 123 | CXXFLAGS=
|
|---|
| 124 | AC_PROG_CXX_G
|
|---|
| 125 | if test "$ac_test_CXXFLAGS" = set; then
|
|---|
| 126 | CXXFLAGS="$ac_save_CXXFLAGS"
|
|---|
| 127 | elif test $ac_cv_prog_cxx_g = yes; then
|
|---|
| 128 | CXXFLAGS="-g -O2"
|
|---|
| 129 | else
|
|---|
| 130 | CXXFLAGS="-O2"
|
|---|
| 131 | fi
|
|---|
| 132 | else
|
|---|
| 133 | GXX=
|
|---|
| 134 | test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
|
|---|
| 135 | fi
|
|---|
| 136 | ])
|
|---|
| 137 |
|
|---|
| 138 | LIB_AC_PROG_CXX
|
|---|
| 139 |
|
|---|
| 140 | dnl version is pulled out to make it a bit easier to change using sed.
|
|---|
| 141 | version=0.0.7
|
|---|
| 142 | dnl Still use "libjava" here to placate dejagnu.
|
|---|
| 143 | AM_INIT_AUTOMAKE(libjava, $version)
|
|---|
| 144 |
|
|---|
|
|---|