/[classpath]/classpath/configure.in
ViewVC logotype

Diff of /classpath/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.75 by mark, Fri Oct 19 17:49:52 2001 UTC revision 1.76 by cbj, Sun Oct 28 01:15:04 2001 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
2    
3    dnl Turning off cache for debug reasons
4    dnl define([AC_CACHE_LOAD], )dnl
5    dnl define([AC_CACHE_SAVE], )dnl
6    
7  AC_INIT(java/lang/System.java)  AC_INIT(java/lang/System.java)
8    
9  AC_CANONICAL_HOST  AC_CANONICAL_SYSTEM
10    
11  PACKAGE="classpath"  PACKAGE="classpath"
12  VERSION="0.02"  VERSION="0.03"
13  LIBVERSION="0:0:0"  LIBVERSION="0:0:0"
14  AC_SUBST(PACKAGE)  AC_SUBST(PACKAGE)
15  AC_SUBST(VERSION)  AC_SUBST(VERSION)
# Line 16  AM_CONFIG_HEADER(include/config.h) Line 20  AM_CONFIG_HEADER(include/config.h)
20    
21  AC_PREFIX_DEFAULT(/usr/local/classpath)  AC_PREFIX_DEFAULT(/usr/local/classpath)
22    
 dnl Initialize libtool  
 AM_DISABLE_STATIC  
 AM_PROG_LIBTOOL  
   
23  dnl required if SUBDIRS is used  dnl required if SUBDIRS is used
24  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
25    
26  dnl Checks for programs.  AC_ARG_ENABLE(java,
27  dnl AC_PROG_CXX  [  --enable-java           compile Java source [default=yes]],
28  AC_PROG_AWK  [case "${enableval}" in
29  AC_PROG_CC    yes) COMPILE_JAVA=yes ;;
30  AC_PROG_CPP    no) COMPILE_JAVA=no ;;
31  AC_PROG_INSTALL    *) COMPILE_JAVA=yes ;;
32    esac],
33    [COMPILE_JAVA=yes])
34    
35    AC_ARG_ENABLE(jni,
36    [  --enable-jni            compile JNI source [default=no]],
37    [case "${enableval}" in
38      yes)
39        COMPILE_JNI=yes
40        COMPILE_JAVA=yes
41    
42        ;;
43      no) COMPILE_JNI=no ;;
44      *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
45    esac],
46    [COMPILE_JNI=no])
47    
48    AC_ARG_ENABLE(cni,
49    [  --enable-cni            compile CNI source [default=no]],
50    [case "${enableval}" in
51      yes) COMPILE_CNI=yes; COMPILE_JAVA=yes ;;
52      no) COMPILE_CNI=no ;;
53      *) COMPILE_CNI=yes; COMPILE_JAVA=yes ;;
54    esac],
55    [COMPILE_CNI=no])
56    
57    AM_CONDITIONAL(CREATE_JNI_HEADERS, test x$COMPILE_JNI = xyes)
58    AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test x$COMPILE_JNI = xyes)
59    AM_CONDITIONAL(CREATE_CNI_LIBRARIES, test x$COMPILE_CNI = xyes)
60    
61  AC_PROG_LN_S  AC_PROG_LN_S
62  AC_HEADER_STDC  AC_PROG_INSTALL
 AC_CHECK_HEADERS(unistd.h sys/types.h sys/config.h inttypes.h stdint.h)  
 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED))  
 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED))  
 AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))  
 AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))  
 AC_C_CONST  
 AC_CHECK_FUNCS(gethostname socket strerror fork pipe execve strtod atof)  
 AC_HEADER_TIME  
 AC_STRUCT_TM  
 AC_STRUCT_TIMEZONE  
   
 AC_C_BIGENDIAN  
   
 dnl guile checks - shouldn't need now that mauve exists  
 dnl GUILE_FLAGS  
   
 dnl We want to avoid -O2 at the moment, gcc 2.96 from Red Hat 7  
 dnl cannot compile some native functions (gcc errors) with this  
 dnl flag.  
 CFLAGS="-g"  
   
 dnl We want warnings, lots of warnings :-)  
 if eval "test x$GCC = xyes"; then  
   JAPHAR_GREP_CFLAGS(-Wall, [  
     CFLAGS="$CFLAGS -Wall"  
   ])  
 fi  
63    
64  dnl Check for cthreads, w32 threads, pthreads  dnl Checks for programs.
65  dnl CLASSPATH_CHECK_THREADS  if test "${COMPILE_JNI}" = "yes"; then
66      dnl AC_PROG_CXX
67      dnl Initialize libtool
68      AM_DISABLE_STATIC
69      AM_PROG_LIBTOOL
70      dnl AC_PROG_AWK
71      AC_PROG_CC
72      AC_PROG_CPP
73      AC_HEADER_STDC
74      AC_CHECK_HEADERS(unistd.h sys/types.h sys/config.h inttypes.h stdint.h)
75      AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED))
76      AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED))
77      AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))
78      AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))
79    
80      AC_CHECK_FUNCS(gethostname socket strerror fork pipe execve strtod atof)
81      AC_HEADER_TIME
82      AC_STRUCT_TM
83      AC_STRUCT_TIMEZONE
84    
85      AC_C_CONST
86    
87      dnl FIXME - does not allow cross compiling
88      AC_C_BIGENDIAN
89    
90      AC_CYGWIN
91      AC_MINGW32
92    
93      dnl We want to avoid -O2 at the moment, gcc 2.96 from Red Hat 7
94      dnl cannot compile some native functions (gcc errors) with this
95      dnl flag.
96      CFLAGS="-g"
97    
98      dnl We want warnings, lots of warnings :-)
99      if eval "test x$GCC = xyes"; then
100        JAPHAR_GREP_CFLAGS(-Wall, [ CFLAGS="$CFLAGS -Wall" ])
101      fi
102    
103  dnl Check for AWT related glib/gtk/libart_lgpl    dnl Check for AWT related glib/gtk/libart_lgpl
104  AM_PATH_GTK(1.2.4,,exit 1)    AM_PATH_GTK(1.2.4,,exit 1)
105  AM_PATH_GLIB(1.2.4,,exit 1,gthread)    AM_PATH_GLIB(1.2.4,,exit 1,gthread)
 dnl XXX Fix me when libart.m4 has the compile test fixed!  
 enable_libarttest=no  
 AM_PATH_LIBART(2.1.0,,exit 1)  
   
 dnl -----------------------------------------------------------  
 dnl Must do automatic checks before specific --with-* overrides  
 dnl for vm programs, includes, libraries  
 dnl -----------------------------------------------------------  
   
 dnl --with-japhar  
 CLASSPATH_CHECK_JAPHAR  
   
 dnl --with-kaffe  
 CLASSPATH_CHECK_KAFFE  
106    
107  dnl -----------------------------------------------------------    dnl XXX Fix me when libart.m4 has the compile test fixed!
108      enable_libarttest=no
109      AM_PATH_LIBART(2.1.0,,exit 1)
110    
111      CLASSPATH_WITH_JAVAH
112    
113  dnl -----------------------------------------------------------    CLASSPATH_WITH_INCLUDEDIR
 dnl Various overrides are allowed here to contradict defaults  
 dnl from automatic VM checks.  
 dnl -----------------------------------------------------------  
   
 AC_ARG_WITH(java,  
   [  --with-java                  specify path to a java-like program ],  
   [  
     if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then  
       # set javac to user input value  
       AC_MSG_CHECKING(for java)  
       USER_JABBA=${withval}  
       AC_SUBST(USER_JABBA)  
       AC_MSG_RESULT(${withval})  
       conditional_with_java=true  
     fi  
   ],  
   [ conditional_with_java=false])  
   
 AM_CONDITIONAL(USER_SPECIFIED_JABBA, test x$conditional_with_java = xtrue)  
   
 AC_ARG_WITH(javah,  
   [  --with-javah                 specify path to a javah-like program ],  
   [  
     if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then  
       # set javah to user input value  
       AC_MSG_CHECKING(for javah)  
       USER_JAVAH=${withval}  
       AC_SUBST(USER_JAVAH)  
       AC_MSG_RESULT(${withval})  
       conditional_with_javah=true  
     fi  
   ],  
   [ conditional_with_javah=false ])  
 AM_CONDITIONAL(USER_SPECIFIED_JAVAH, test x$conditional_with_javah = xtrue)  
   
 dnl define JIKES for Makefile.am if --with-jikes specified to configure  
 CLASSPATH_CHECK_JIKES  
 AM_CONDITIONAL(USER_SPECIFIED_JIKES, test x$conditional_with_jikes = xtrue)  
   
 dnl define KJC_CLASSPATH for Makefile.am if --with-kjc specified to configure  
 CLASSPATH_CHECK_KJC  
   
 AC_ARG_WITH(classlib,  
   [  --with-classlib      specify path to a classes.zip like file ],  
   [  
     if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then  
       # set class library to user input value  
       AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test x = y)  
       AC_MSG_CHECKING(for classlib)  
       USER_CLASSLIB=${withval}  
       AC_SUBST(USER_CLASSLIB)  
       AC_MSG_RESULT(${withval})  
       conditional_with_classlib=true  
     fi  
   ],  
   [ conditional_with_classlib=false ])  
 AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test x$conditional_with_classlib = xtrue)  
   
 AC_ARG_WITH(includedir,  
   [  --with-includedir=DIR   specify path to an extra include dir ],  
   [  
     AC_MSG_CHECKING(for includedir)  
     if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then  
       if test -r ${withval}; then  
         if test "$EXTRA_INCLUDES" = ""; then  
           EXTRA_INCLUDES="-I${withval}"  
         else  
           EXTRA_INCLUDES="${EXTRA_INCLUDES} -I${withval}"  
         fi  
         AC_SUBST(EXTRA_INCLUDES)  
         AC_MSG_RESULT("added ${withval}")  
       else  
         AC_MSG_RESULT("${withval} does not exist")  
       fi  
     fi  
   ],  
   [  
     if test -z "$EXTRA_INCLUDES"; then  
       EXTRA_INCLUDES=""  
       AC_SUBST(EXTRA_INCLUDES)  
     fi  
   ])  
   
 dnl -----------------------------------------------------------  
   
 dnl -----------------------------------------------------------  
 dnl Initialize maintainer mode, not clear to me yet whether  
 dnl developer-mode is still needed but maintainer-mode definitely  
 dnl is.  
 dnl -----------------------------------------------------------  
 AM_MAINTAINER_MODE  
114    
115  dnl This build mode indicates to configure it should compile java classes    AC_LINK_FILES(include/jni_md-${target_vendor}-${target_os}.h, include/jni_md.h)
 dnl but not rebuild the dependency files for doing so.  The default then is to  
 dnl not build any Java classes (glibj.zip is distributed in the build using  
 dnl the maintainer-mode)  
 AC_ARG_ENABLE(developer-mode,  
 [  --enable-developer-mode enable some of the rules in maintainer-mode  
                           (compilation of Java classes) [default=no]],  
 [case "${enableval}" in  
   yes) USE_DEVELOPER_MODE=yes ;;  
   no) USE_DEVELOPER_MODE=no ;;  
   *) AC_MSG_ERROR(bad value ${enableval} for --enable-developer-mode) ;;  
 esac],  
 [USE_DEVELOPER_MODE=no])  
 if test x${USE_MAINTAINER_MODE} = "xyes"; then  
   USE_DEVELOPER_MODE=no  
116  fi  fi
 AM_CONDITIONAL(DEVELOPER_MODE, test x$USE_DEVELOPER_MODE = xyes)  
 dnl to mimic MAINT from AM_MAINTAINER_MODE  
 DEVEL=$DEVELOPER_MODE_TRUE  
 AC_SUBST(DEVEL)  
117    
118  dnl -----------------------------------------------------------  CLASSPATH_FIND_JAVAC
119    
120    CLASSPATH_WITH_CLASSLIB
121    
122    
123  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
124    dnl Initialize maintainer mode
125    dnl -----------------------------------------------------------
126    AM_MAINTAINER_MODE
127    
128    dnl -----------------------------------------------------------
129  dnl Enable debugging statements at compile time.  By default  dnl Enable debugging statements at compile time.  By default
130  dnl these statements should be optimized out of the bytecode  dnl these statements should be optimized out of the bytecode
131  dnl produced by an optimizing Java compiler and not hinder  dnl produced by an optimizing Java compiler and not hinder
132  dnl performance.  dnl performance because debugging is turns off by default.
133  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
134  AC_ARG_ENABLE(debug,  AC_ARG_ENABLE(debug,
135  [  --enable-debug   enable runtime debugging code],  [  --enable-debug          enable runtime debugging code],
136  [case "${enableval}" in  [case "${enableval}" in
137    yes)    yes)
138          LIBDEBUG="true"          LIBDEBUG="true"
# Line 218  AC_ARG_ENABLE(debug, Line 143  AC_ARG_ENABLE(debug,
143  esac],  esac],
144  [LIBDEBUG="false"])  [LIBDEBUG="false"])
145  AC_SUBST(LIBDEBUG)  AC_SUBST(LIBDEBUG)
   
146  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
147    
148    
# Line 229  dnl want to disable this, but some VMs ( Line 153  dnl want to disable this, but some VMs (
153  dnl them.  dnl them.
154  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
155  AC_ARG_ENABLE(load-library,  AC_ARG_ENABLE(load-library,
156  [  --enable-load-library   [default=yes]],  [  --enable-load-library   enable to use JNI native methods [default=yes]
157                              (disabled automatically using --enable-cni)],
158  [case "${enableval}" in  [case "${enableval}" in
159    yes) INIT_LOAD_LIBRARY="true" ;;    yes) INIT_LOAD_LIBRARY="true" ;;
160    no) INIT_LOAD_LIBRARY="false" ;;    no) INIT_LOAD_LIBRARY="false" ;;
161    *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;    *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
162  esac],  esac],
163  [INIT_LOAD_LIBRARY="true"])  [
164      if test "$COMPILE_CNI" = "yes"; then
165        INIT_LOAD_LIBRARY="false"
166      else
167        INIT_LOAD_LIBRARY="true"
168      fi
169    ])
170  AC_SUBST(INIT_LOAD_LIBRARY)  AC_SUBST(INIT_LOAD_LIBRARY)
   
171  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
172    
173    
174  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
175  dnl This takes care of autodetecting our preferred VM when one  dnl Small loop to add other things to EXTRA_INCLUDES from a VM
 dnl isn't specified explicitly.  
176  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
177  dnl if no jvm yet defined, check for japhar  dnl for i in $JAPHAR_CFLAGS $KAFFE_CFLAGS ; do
178  dnl if test -z "$JVM" || test "$JVM" = "no"; then  dnl   add_to_extra_includes=1
179  dnl     # need to have these defined if no vm selected, default to japhar  dnl   for j in $EXTRA_INCLUDES ; do
180  dnl     if test -z "$JVM_REFERENCE"; then  dnl     if test $i = $j ; then
181  dnl X dnl conditional_with_classlib != xtrue || test x$conditional_with_javah !=  xtrue; then  dnl       add_to_extra_includes=0
 dnl X dnl      echo classlib $conditional_with_classlib  
 dnl X dnl      echo javah $conditional_with_javah  
 dnl       CLASSPATH_INTERNAL_CHECK_JAPHAR  
 dnl       AC_MSG_CHECKING(for defined vm)  
 dnl       if test -z "$JVM" || test "$JVM" = "no"; then  
 dnl         AC_MSG_ERROR(no: try --with-japhar or --with-kaffe)  
 dnl       else  
 dnl         AC_MSG_RESULT(yes)  
 dnl       fi  
182  dnl     fi  dnl     fi
183  dnl fi  dnl   done
184    dnl   if test $add_to_extra_includes -eq 1; then
185  dnl must check our conditionals from vm checks  dnl     EXTRA_INCLUDES="$EXTRA_INCLUDES $i"
186  AM_CONDITIONAL(JAPHAR, test x$conditional_with_japhar = xtrue)  dnl   fi
187  AM_CONDITIONAL(KAFFE, test x$conditional_with_kaffe = xtrue)  dnl done
 dnl can be defined by kaffe check, should be here should we autodetect  
 dnl kaffe in the future  
 AM_CONDITIONAL(USER_SPECIFIED_KJC, test x$conditional_with_kjc = xtrue)  
   
188  dnl -----------------------------------------------------------  dnl -----------------------------------------------------------
189    
 dnl -----------------------------------------------------------  
 dnl Small loop to add other things to EXTRA_INCLUDES from a VM  
 dnl -----------------------------------------------------------  
 for i in $JAPHAR_CFLAGS $KAFFE_CFLAGS ; do  
   add_to_extra_includes=1  
   for j in $EXTRA_INCLUDES ; do  
     if test $i = $j ; then  
       add_to_extra_includes=0  
     fi  
   done  
   if test $add_to_extra_includes -eq 1; then  
     EXTRA_INCLUDES="$EXTRA_INCLUDES $i"  
   fi  
 done  
   
 dnl -----------------------------------------------------------  
190    
191  dnl Create a link to the VM specific files we're compiling with  dnl Create a link to the VM specific files we're compiling with
192  if test x"$JVM_REFERENCE" = x; then  if test x"$JVM_REFERENCE" = x; then
# Line 348  gnu/java/security/util/Makefile Line 248  gnu/java/security/util/Makefile
248  gnu/java/text/Makefile  gnu/java/text/Makefile
249  gnu/java/util/Makefile  gnu/java/util/Makefile
250  gnu/java/util/prefs/Makefile  gnu/java/util/prefs/Makefile
251    include/jni.h
252  java/Makefile  java/Makefile
253  java/applet/Makefile  java/applet/Makefile
254  java/awt/Makefile  java/awt/Makefile

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26