configure.ac
来自「linux下建立JAVA虚拟机的源码KAFFE」· AC 代码 · 共 629 行 · 第 1/2 页
AC
629 行
dnl Process this file with autoconf to produce a configure script.dnl -----------------------------------------------------------dnl Turning off cache for debug reasonsdnl -----------------------------------------------------------dnl define([AC_CACHE_LOAD], )dnldnl define([AC_CACHE_SAVE], )dnlAC_INIT([GNU Classpath],[0.91-pre],[classpath@gnu.org],[classpath])AC_CONFIG_SRCDIR(java/lang/System.java)AC_CANONICAL_TARGETdnl -----------------------------------------------------------dnl Fold all IA-32 CPU architectures into "x86"dnl -----------------------------------------------------------if expr ${target_cpu} : '.*86' > /dev/null; then target_cpu=x86; fidnl -----------------------------------------------------------dnl We will not track/change lib version until we reach version 1.0dnl at which time we'll have to be more anal about such thingsdnl -----------------------------------------------------------AC_SUBST(LIBVERSION, "0:0:0")case "$host_os" in darwin*) cp_module="" ;; *) cp_module="-module" ;;esacCLASSPATH_MODULE="${cp_module} -version-info ${LIBVERSION} -no-undefined"AC_SUBST(CLASSPATH_MODULE)AC_PREREQ(2.59)AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])AC_CONFIG_HEADERS([include/config.h])AC_PREFIX_DEFAULT(/usr/local/classpath)dnl -----------------------------------------------------------dnl Enable collections.jar (disabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([collections], [AS_HELP_STRING(--enable-collections,create collections.jar [default=no])], [case x"${enableval}" in xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;; xno) COMPILE_COLLECTIONS=no ;; x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;; *) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;; esac], [COMPILE_COLLECTIONS=no])AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)dnl -----------------------------------------------------------dnl Enable JNI libraries (enabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([jni], [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])], [case "${enableval}" in yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; no) COMPILE_JNI=no ;; *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; esac], [COMPILE_JNI=yes])AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes)dnl -----------------------------------------------------------dnl Enable core JNI libraries (enabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([core-jni], [AS_HELP_STRING(--enable-core-jni, compile JNI sources for core [default=yes])], [case "${enableval}" in yes) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;; no) COMPILE_CORE_JNI=no ;; *) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;; esac], [COMPILE_CORE_JNI=yes])AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)dnl ------------------------------------------------------------dnl Whether to compile with -Werror or not (disabled by default)dnl ------------------------------------------------------------AC_ARG_ENABLE([Werror], [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])], [case "${enableval}" in yes) ENABLE_WERROR=yes ;; no) ENABLE_WERROR=no ;; *) ENABLE_WERROR=no ;; esac], [ENABLE_WERROR=no])dnl -----------------------------------------------------------dnl Default AWT toolkitdnl -----------------------------------------------------------AC_ARG_ENABLE(default-toolkit, AS_HELP_STRING([--enable-default-toolkit], [fully qualified class name of default AWT toolkit]))default_toolkit=$enable_default_toolkitif test "$default_toolkit" = ""; then default_toolkit=gnu.java.awt.peer.gtk.GtkToolkitfiAC_SUBST(default_toolkit)dnl -----------------------------------------------------------dnl Native libxml/xslt library (disabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([xmlj], [AS_HELP_STRING(--enable-xmlj,compile native libxml/xslt library [default=no])], [case "${enableval}" in yes) COMPILE_XMLJ=yes ;; no) COMPILE_XMLJ=no ;; *) COMPILE_XMLJ=no ;; esac], [COMPILE_XMLJ=no])AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)dnl -----------------------------------------------------------dnl ALSA code (enabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([alsa], [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])], [case "${enableval}" in yes) COMPILE_ALSA=yes ;; no) COMPILE_ALSA=no ;; *) COMPILE_ALSA=yes ;; esac], [AC_CHECK_HEADERS([alsa/asoundlib.h], [AC_CHECK_LIB([asound], [snd_seq_open], COMPILE_ALSA=yes,COMPILE_ALSA=no)], COMPILE_ALSA=no)])AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)dnl -----------------------------------------------------------dnl DSSI code (enabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([dssi], [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])], [case "${enableval}" in yes) COMPILE_DSSI=yes ;; no) COMPILE_DSSI=no ;; *) COMPILE_DSSI=yes ;; esac], [AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)])AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)dnl -----------------------------------------------------------dnl GTK native peer (enabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([gtk-peer], [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])], [case "${enableval}" in yes) COMPILE_GTK_PEER=yes ;; no) COMPILE_GTK_PEER=no ;; *) COMPILE_GTK_PEER=yes ;; esac], [COMPILE_GTK_PEER=yes])AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes)dnl -----------------------------------------------------------dnl GTK native peer error checking dnl -----------------------------------------------------------AC_ARG_ENABLE([gtk-peers],,AC_MSG_ERROR([No --enable-gtk-peers (or --disable-gtk-peers) option; you want --enable-gtk-peer]))dnl ------------------------------------------------------------dnl determine whether to enable the cairo GTK Graphics2D backenddnl ------------------------------------------------------------AC_ARG_ENABLE([gtk-cairo], [AS_HELP_STRING(--enable-gtk-cairo,build the cairo Graphics2D implementation on GTK [default=no])], [case "${enableval}" in yes) GTK_CAIRO_ENABLED=true ;; no) GTK_CAIRO_ENABLED=false ;; *) GTK_CAIRO_ENABLED=true ;; esac], [GTK_CAIRO_ENABLED=false])AC_SUBST(GTK_CAIRO_ENABLED)if test "x${GTK_CAIRO_ENABLED}" = xtrue; then AC_DEFINE(GTK_CAIRO, 1, [defined if cairo support was built in])fiAM_CONDITIONAL(GTK_CAIRO, test "x${GTK_CAIRO_ENABLED}" = xtrue)dnl -----------------------------------------------------------dnl Qt native peer (disabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([qt-peer], [AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])], [case "${enableval}" in yes) COMPILE_QT_PEER=yes ;; no) COMPILE_QT_PEER=no ;; *) COMPILE_QT_PEER=yes ;; esac], [COMPILE_QT_PEER=no])AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)dnl -----------------------------------------------------------dnl Sets the native libraries installation dirdnl -----------------------------------------------------------AC_ARG_WITH([native-libdir], [AS_HELP_STRING(--with-native-libdir,sets the installation directore for native libraries [default='${libdir}/${PACKAGE}'])], [ nativeexeclibdir=${withval} ], [ nativeexeclibdir='${libdir}/${PACKAGE}' ])AC_SUBST(nativeexeclibdir)dnl -----------------------------------------------------------dnl Sets the Java library installation dir.dnl -----------------------------------------------------------AC_ARG_WITH([glibj-dir], [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])], [ glibjdir=${withval} ], [ glibjdir='${datadir}/${PACKAGE}' ])AC_SUBST(glibjdir)dnl -----------------------------------------------------------dnl Regenerate headers at build time (disabled by default)dnl -----------------------------------------------------------AC_ARG_ENABLE([regen-headers], [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])], [case "${enableval}" in yes) REGENERATE_JNI_HEADERS=yes ;; no) REGENERATE_JNI_HEADERS=no ;; *) REGENERATE_JNI_HEADERS=no ;; esac], [REGENERATE_JNI_HEADERS=no])AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)AC_PROG_LN_SAC_PROG_INSTALLdnl -----------------------------------------------------------dnl Checks for programs.dnl -----------------------------------------------------------AC_PROG_CXXdnl Initialize libtoolAC_DISABLE_STATICAC_PROG_LIBTOOLdnl AC_PROG_AWKAC_PROG_CCAC_PROG_CPPif test "x${COMPILE_COLLECTIONS}" = xyes; then AC_PATH_PROG(PERL, [perl]) AC_SUBST(PERL) AC_SUBST(COLLECTIONS_PREFIX) AC_CONFIG_FILES([lib/mkcollections.pl]) AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])fiif test "x${COMPILE_JNI}" = xyes; then AC_HEADER_STDC dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64, dnl at least. AC_COMPILE_CHECK_SIZEOF(void *) dnl Checking for endianess. AC_C_BIGENDIAN_CROSS dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there. dnl On that system, sys/ioctl.h will not include sys/filio.h unless dnl BSD_COMP is defined; just including sys/filio.h is simpler. dnl Check for crt_externs.h on Darwin. AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \ asm/ioctls.h \ inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \ sys/time.h \ sys/select.h \ crt_externs.h \ fcntl.h \ sys/mman.h]) AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t])) AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t])) AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t])) AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t])) AC_CHECK_FUNCS([ftruncate fsync select \ gethostname socket strerror fork pipe execve open close \ lseek fstat read write htonl memset htons connect \ getsockname getpeername bind listen accept \ recvfrom send sendto setsockopt getsockopt time mktime \ localtime_r \ strerror_r \ fcntl \ mmap munmap mincore msync madvise getpagesize sysconf \ isnan]) AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])], [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_MSG_CHECKING([for global timezone variable]) dnl FIXME: we don't want a link check here because that won't work dnl when cross-compiling. So instead we make an assumption that dnl the header file will mention timezone if it exists. dnl Don't find the win32 function timezone AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])], [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?