Index: acinclude.m4 =================================================================== RCS file: /cvsroot/classpath/classpath/acinclude.m4,v retrieving revision 1.37 diff -u -b -B -r1.37 acinclude.m4 --- acinclude.m4 18 May 2004 13:33:30 -0000 1.37 +++ acinclude.m4 19 May 2004 06:10:32 -0000 @@ -1,79 +1,6 @@ dnl Used by aclocal to generate configure dnl ----------------------------------------------------------- -dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) -dnl ----------------------------------------------------------- -AC_DEFUN([JAPHAR_GREP_CFLAGS], -[case "$CFLAGS" in -"$1" | "$1 "* | *" $1" | *" $1 "* ) - ifelse($#, 3, [$3], [:]) - ;; -*) - $2 - ;; -esac -]) - -dnl ----------------------------------------------------------- -dnl CLASSPATH_CHECK_JAPHAR -dnl ----------------------------------------------------------- -AC_DEFUN([CLASSPATH_CHECK_JAPHAR], -[ - if test "x$1" = x; then - AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", $PATH:/usr/local/japhar/bin:/usr/japhar/bin) - else - AC_PATH_PROG(JAPHAR_CONFIG, japhar-config, "", $1/bin:$PATH) - fi - if test "x${JAPHAR_CONFIG}" = x; then - echo "configure: cannot find japhar-config: is Japhar installed?" 1>&2 - exit 1 - fi - AC_MSG_CHECKING(for Japhar) - JAPHAR_PREFIX="`$JAPHAR_CONFIG --prefix`" - JAPHAR_CFLAGS="`$JAPHAR_CONFIG compile`" - JAPHAR_LIBS="`$JAPHAR_CONFIG link`" - JVM="yes" - JVM_REFERENCE="reference" - AC_SUBST(JAPHAR_PREFIX) - AC_SUBST(JAPHAR_CFLAGS) - AC_SUBST(JAPHAR_LIBS) - AC_SUBST(JVM) - AC_SUBST(JVM_REFERENCE) - conditional_with_japhar=true - AC_MSG_RESULT(yes) - - dnl define WITH_JAPHAR for native compilation - AC_DEFINE(WITH_JAPHAR) - - dnl Reset prefix so that we install into Japhar directory - prefix=$JAPHAR_PREFIX - AC_SUBST(prefix) - - dnl programs we probably need somewhere - _t_bindir=`$JAPHAR_CONFIG info bindir` - _t_datadir=`$JAPHAR_CONFIG info datadir` - AC_PATH_PROG(JAPHAR_JABBA, japhar, "", $_t_bindir:$PATH) - AC_PATH_PROG(JAPHAR_JAVAC, javac, "", $_t_bindir:$PATH) - AC_PATH_PROG(JAPHAR_JAVAH, javah, "", $_t_bindir:$PATH) - AC_MSG_CHECKING(for Japhar classes) - if test -e $_t_datadir/classes.zip; then - JAPHAR_CLASSLIB=$_t_datadir/classes.zip - elif test -e $_t_datadir/classes.jar; then - JAPHAR_CLASSLIB=$_t_datadir/classes.jar - elif test -e $_t_datadir/rt.jar; then - JAPHAR_CLASSLIB=$_t_datadir/rt.jar - elif test -e $_t_datadir/rt.zip; then - JAPHAR_CLASSLIB=$_t_datadir/rt.zip - fi - if test $JAPHAR_CLASSLIB ; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - AC_SUBST(JAPHAR_CLASSLIB) -]) - -dnl ----------------------------------------------------------- dnl CLASSPATH_CHECK_KAFFE dnl ----------------------------------------------------------- AC_DEFUN([CLASSPATH_CHECK_KAFFE], @@ -160,27 +87,6 @@ ]) dnl ----------------------------------------------------------- -dnl CLASSPATH_WITH_JAPHAR - checks for japhar -dnl ----------------------------------------------------------- -AC_DEFUN([CLASSPATH_WITH_JAPHAR], -[ - AC_ARG_WITH([japhar], - [AS_HELP_STRING(--with-japhar,configure GNU Classpath for Japhar [default=yes])], - [ - if test "x${withval}" = xyes || test "x${withval}" = x; then - CLASSPATH_CHECK_JAPHAR - elif test "x${withval}" != xno || test "x${withval}" != xfalse; then - CLASSPATH_CHECK_JAPHAR(${withval}) - fi - ], - [ - conditional_with_japhar=false - JAPHAR_CFLAGS="" - AC_SUBST(JAPHAR_CFLAGS) - ]) -]) - -dnl ----------------------------------------------------------- dnl CLASSPATH_WITH_KAFFE - checks for which java virtual machine to use dnl ----------------------------------------------------------- AC_DEFUN([CLASSPATH_WITH_KAFFE], @@ -196,66 +102,6 @@ KAFFE_CFLAGS="" AC_SUBST(KAFFE_CFLAGS) ]) -]) - -dnl ----------------------------------------------------------- -dnl threads packages (mostly stolen from Japhar) -dnl given that japhar-config gives -lpthread, may not need this (cbj) -dnl ----------------------------------------------------------- -AC_DEFUN([CLASSPATH_CHECK_THREADS], -[ - threads=no - - if test "x${threads}" = xno; then - AC_CHECK_LIB(threads, cthread_fork) - if test "x${ac_cv_lib_threads_cthread_fork}" = xyes; then - AC_DEFINE(USE_CTHREADS, ) - threads=yes - fi - fi - - if test "x${threads}" = xno; then - AC_CHECK_FUNCS(_beginthreadex) - if test "x${ac_cv_CreateThread}" = xyes; then - AC_DEFINE(USE_WIN32_THREADS, ) - AC_CHECK_FUNCS(CloseHandle SetThreadPriority ExitThread Sleep \ - GetCurrentThreadId TlsAlloc TlsSetValue TlsGetValue) - threads=yes - fi - fi - - if test "x${threads}" = xno; then - AC_CHECK_LIB(pthread, pthread_create) - if test "x${ac_cv_lib_pthread_pthread_create}" = xyes; then - threads=yes - fi - - if test "x${threads}" = xno; then - AC_CHECK_LIB(c_r, pthread_create) - if test "x${ac_cv_lib_c_r_pthread_create}" = xyes; then - threads=yes - fi - fi - - if test "x${threads}" = xno; then - # HP/UX 10.20 uses -lcma - AC_CHECK_LIB(cma, pthread_create) - if test "x${ac_cv_lib_cma_pthread_create}" = xyes; then - threads=yes - fi - fi - - if test "x${threads}" = xno; then - AC_CHECK_LIB(c, pthread_create) - if test "x${ac_cv_lib_c_pthread_create}" = xyes; then - threads=yes - fi - fi - - if test "x${threads}" = xyes; then - AC_DEFINE(USE_PTHREADS, ) - fi - fi ]) dnl -----------------------------------------------------------