cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
jfclere 2005/08/22 13:30:18 Modified:jni/native configure.in jni/native/build tcnative.m4 Log: Allow to use sableVM. Revision ChangesPath 1.10 +11 -4 jakarta-tomcat-connectors/jni/native/configure.in Index: configure.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/configure.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- configure.in 2 Aug 2005 11:33:11 - 1.9 +++ configure.in 22 Aug 2005 20:30:18 - 1.10 @@ -85,16 +85,23 @@ AC_PROG_INSTALL dnl -dnl Find the APR-ICONV directory. +dnl Find the JVM related information dnl TCN_FIND_JDK -TCN_FIND_JDK_OS +TCN_SABLEVM +APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/include]) + +dnl sableVM does not have/need $JAVA_OS/jni_md.h +if test $SABLEVM = NONE +then + TCN_FIND_JDK_OS + APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/include/$JAVA_OS]) +fi + AC_SUBST(JAVA_HOME) AC_SUBST(JAVA_PLATFORM) AC_SUBST(JAVA_OS) -APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/include]) -APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/include/$JAVA_OS]) dnl dnl Detect openssl toolkit installation 1.10 +16 -0 jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- tcnative.m4 12 Jun 2005 06:10:13 - 1.9 +++ tcnative.m4 22 Aug 2005 20:30:18 - 1.10 @@ -195,6 +195,22 @@ ]) ]) +dnl check for sableVM +dnl (copied from daemon/src/native/unix/support/apjava.m4) +AC_DEFUN( + [TCN_SABLEVM], + [ + if test x$JAVA_HOME != x + then +AC_PATH_PROG(SABLEVM,sablevm,NONE,$JAVA_HOME/bin) +if test $SABLEVM != NONE +then + AC_MSG_RESULT([Using sableVM: $SABLEVM]) + CFLAGS=$CFLAGS -DHAVE_SABLEVM +fi + fi + ]) + dnl TCN_HELP_STRING(LHS, RHS) dnl Autoconf 2.50 can not handle substr correctly. It does have dnl AC_HELP_STRING, so let's try to call it if we can. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
mturk 2005/06/11 23:10:13 Modified:jni/native Makefile.in configure.in jni/native/build tcnative.m4 Log: Fix compilation by favoring CFLAGS, CPPFLAGS, LIBS and LDFLAGS set before calling configure. Revision ChangesPath 1.9 +5 -1 jakarta-tomcat-connectors/jni/native/Makefile.in Index: Makefile.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/Makefile.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.in 6 Jun 2005 16:15:20 - 1.8 +++ Makefile.in 12 Jun 2005 06:10:13 - 1.9 @@ -2,6 +2,9 @@ # Top-level Makefile for TCNATIVE # +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + # gets substituted into some targets [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ @@ -9,7 +12,8 @@ srcdir = @srcdir@ VPATH = @srcdir@ -INCLUDES = @SSL_CFLAGS@ @TCNATIVE_INCLUDES@ @TCNATIVE_PRIV_INCLUDES@ @APR_INCLUDES@ +# this sucks, but it's the only way to add extra flags to the LT_COMPILE +INCLUDES = @CFLAGS@ @CPPFLAGS@ @TCNATIVE_INCLUDES@ @TCNATIVE_PRIV_INCLUDES@ @APR_INCLUDES@ TCNATIVE_LDFLAGS = @TCNATIVE_LDFLAGS@ TCNATIVE_LIBS = @TCNATIVE_LIBS@ 1.5 +4 -3 jakarta-tomcat-connectors/jni/native/configure.in Index: configure.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- configure.in 6 Jun 2005 16:15:20 - 1.4 +++ configure.in 12 Jun 2005 06:10:13 - 1.5 @@ -81,8 +81,6 @@ dnl APR_SETIFNULL(CC, `$apr_config --cc`) APR_SETIFNULL(CPP, `$apr_config --cpp`) -APR_ADDTO(CFLAGS, `$apr_config --cflags`) -APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`) AC_PROG_INSTALL @@ -133,14 +131,17 @@ dnl dnl Prep all the flags and stuff for compilation and export to other builds dnl +APR_ADDTO(TCNATIVE_LIBS, [$LIBS]) APR_ADDTO(TCNATIVE_LIBS, [$APR_LIBS]) +APR_ADDTO(TCNATIVE_LDFLAGS, [$LDFLAGS]) AC_SUBST(TCNATIVE_EXPORT_LIBS) AC_SUBST(TCNATIVE_PRIV_INCLUDES) AC_SUBST(TCNATIVE_INCLUDES) AC_SUBST(TCNATIVE_LDFLAGS) AC_SUBST(TCNATIVE_LIBS) -AC_SUBST(LDFLAGS) +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) dnl copy apr's rules.mk into our build directory. if test ! -d ./build; then 1.9 +1 -2 jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- tcnative.m4 8 Jun 2005 07:56:24 - 1.8 +++ tcnative.m4 12 Jun 2005 06:10:13 - 1.9 @@ -320,8 +320,7 @@ dnl (a) define preprocessor symbols if test $tcn_ssltk_type = openssl; then APR_SETVAR(SSL_LIBS, [-lssl -lcrypto]) -APR_ADDTO(SSL_CFLAGS, [-DHAVE_OPENSSL]) +APR_ADDTO(CFLAGS, [-DHAVE_OPENSSL]) fi AC_SUBST(SSL_LIBS) - AC_SUBST(SSL_CFLAGS) ]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
mturk 2005/06/08 00:56:24 Modified:jni/native/build tcnative.m4 Log: Fix detecting OpenSSL version. Refuse to build for 0.9.7a versions. Revision ChangesPath 1.8 +4 -6 jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- tcnative.m4 6 Jun 2005 16:15:20 - 1.7 +++ tcnative.m4 8 Jun 2005 07:56:24 - 1.8 @@ -237,21 +237,19 @@ if test x$tcn_ssltk_type = x; then AC_MSG_CHECKING(for OpenSSL version) dnl First check for manditory headers -AC_CHECK_HEADERS([openssl/opensslv.h openssl/ssl.h], [tcn_ssltk_type=openssl], []) +AC_CHECK_HEADERS([openssl/opensslv.h], [tcn_ssltk_type=openssl], []) if test $tcn_ssltk_type = openssl; then dnl so it's OpenSSL - test for a good version AC_TRY_COMPILE([#include openssl/opensslv.h],[ #if !defined(OPENSSL_VERSION_NUMBER) #error Missing openssl version #endif -#if (OPENSSL_VERSION_NUMBER 0x0090702f)) +#if (OPENSSL_VERSION_NUMBER 0x0090701f) #error Unsuported openssl version OPENSSL_VERSION_TEXT #endif], [AC_MSG_RESULT(OK)], - [dnl Replace this with OPENSSL_VERSION_TEXT from opensslv.h? - AC_MSG_RESULT([not encouraging]) - echo WARNING: OpenSSL version may contain security vulnerabilities! - echo Ensure the latest security patches have been applied! + [dnl Unsuported OpenSSL version + AC_MSG_ERROR([Unsupported OpenSSL version. Use 0.9.7a or higher version]) ]) dnl Look for additional, possibly missing headers AC_CHECK_HEADERS(openssl/engine.h) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
mturk 2005/05/23 04:43:36 Modified:jni/native Makefile.in configure.in jni/native/build tcnative.m4 Log: Add openssl detection for unix build. Revision ChangesPath 1.3 +2 -3 jakarta-tomcat-connectors/jni/native/Makefile.in Index: Makefile.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.in 17 Jan 2005 07:17:06 - 1.2 +++ Makefile.in 23 May 2005 11:43:36 - 1.3 @@ -1,7 +1,6 @@ # # Top-level Makefile for TCNATIVE # -CPP = @CPP@ # gets substituted into some targets [EMAIL PROTECTED]@ @@ -10,7 +9,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ -INCLUDES = @APR_INCLUDES@ @TCNATIVE_INCLUDES@ @TCNATIVE_PRIV_INCLUDES@ +INCLUDES = @SSL_CFLAGS@ @APR_INCLUDES@ @TCNATIVE_INCLUDES@ @TCNATIVE_PRIV_INCLUDES@ TCNATIVE_LDFLAGS = @TCNATIVE_LDFLAGS@ TCNATIVE_LIBS = @TCNATIVE_LIBS@ @@ -56,7 +55,7 @@ $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir) $(TARGET_LIB): $(OBJECTS) - $(LINK) @lib_target@ @TCNATIVE_LIBS@ + $(LINK) @lib_target@ @TCNATIVE_LIBS@ @SSL_LIBS@ check: $(TARGET_LIB) (cd test $(MAKE) check) 1.2 +5 -2 jakarta-tomcat-connectors/jni/native/configure.in Index: configure.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- configure.in 14 Jan 2005 13:49:25 - 1.1 +++ configure.in 23 May 2005 11:43:36 - 1.2 @@ -30,9 +30,7 @@ fi AC_SUBST(TCN_CONFIG_LOCATION) - AC_CANONICAL_SYSTEM - AC_PROG_INSTALL dnl @@ -100,6 +98,11 @@ APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/include]) APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/include/$JAVA_OS]) +dnl +dnl Detect openssl toolkit installation +dnl +TCN_CHECK_SSL_TOOLKIT + so_ext=$APR_SO_EXT lib_target=$APR_LIB_TARGET AC_SUBST(so_ext) 1.2 +132 -0jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tcnative.m4 14 Jan 2005 13:47:06 - 1.1 +++ tcnative.m4 23 May 2005 11:43:36 - 1.2 @@ -194,3 +194,135 @@ fi ]) ]) + +dnl TCN_HELP_STRING(LHS, RHS) +dnl Autoconf 2.50 can not handle substr correctly. It does have +dnl AC_HELP_STRING, so let's try to call it if we can. +dnl Note: this define must be on one line so that it can be properly returned +dnl as the help string. +AC_DEFUN(TCN_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl + +dnl +dnl TCN_CHECK_SSL_TOOLKIT +dnl +dnl Configure for the detected openssl toolkit installation, giving +dnl preference to --with-ssl=path if it was specified. +dnl +AC_DEFUN(TCN_CHECK_SSL_TOOLKIT,[ + dnl initialise the variables we use + tcn_ssltk_base= + tcn_ssltk_inc= + tcn_ssltk_lib= + tcn_ssltk_type= + AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=DIR,OpenSSL SSL/TLS toolkit), [ +dnl If --with-ssl specifies a directory, we use that directory or fail +if test x$withval != xyes -a x$withval != x; then + dnl This ensures $withval is actually a directory and that it is absolute + tcn_ssltk_base=`cd $withval ; pwd` +fi + ]) + if test x$tcn_ssltk_base = x; then +AC_MSG_RESULT(none) + else +AC_MSG_RESULT($tcn_ssltk_base) + fi + + dnl Run header and version checks + saved_CPPFLAGS=$CPPFLAGS + if test x$tcn_ssltk_base != x; then +tcn_ssltk_inc=-I$tcn_ssltk_base/include +CPPFLAGS=$CPPFLAGS $tcn_ssltk_inc + fi + + if test x$tcn_ssltk_type = x; then +AC_MSG_CHECKING(for OpenSSL version) +dnl First check for manditory headers +AC_CHECK_HEADERS([openssl/opensslv.h openssl/ssl.h], [tcn_ssltk_type=openssl], []) +if test $tcn_ssltk_type = openssl; then + dnl so it's OpenSSL - test for a good version + AC_TRY_COMPILE([#include openssl/opensslv.h],[ +#if !defined(OPENSSL_VERSION_NUMBER) +#error Missing openssl version +#endif +#if (OPENSSL_VERSION_NUMBER 0x009060af) \ + || ((OPENSSL_VERSION_NUMBER 0x00907000) (OPENSSL_VERSION_NUMBER 0x0090702f)) +#error Insecure openssl version OPENSSL_VERSION_TEXT +#endif], + [AC_MSG_RESULT(OK)], + [dnl Replace this with
cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
mturk 2005/05/23 04:49:25 Modified:jni/native/build tcnative.m4 Log: Break with error if openssl toolkit was not found. Revision ChangesPath 1.3 +2 -2 jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tcnative.m4 23 May 2005 11:43:36 - 1.2 +++ tcnative.m4 23 May 2005 11:49:25 - 1.3 @@ -214,7 +214,7 @@ tcn_ssltk_inc= tcn_ssltk_lib= tcn_ssltk_type= - AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=DIR,OpenSSL SSL/TLS toolkit), [ + AC_ARG_WITH(ssl, TCN_HELP_STRING(--with-ssl=DIR,OpenSSL SSL/TLS toolkit), [ dnl If --with-ssl specifies a directory, we use that directory or fail if test x$withval != xyes -a x$withval != x; then dnl This ensures $withval is actually a directory and that it is absolute @@ -268,7 +268,7 @@ fi fi if test $tcn_ssltk_type != openssl; then - AC_MSG_RESULT([no OpenSSL headers found]) +AC_MSG_ERROR([... No OpenSSL headers found]) fi dnl restore CPPFLAGS=$saved_CPPFLAGS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
mturk 2005/05/23 05:23:10 Modified:jni/native/build tcnative.m4 Log: First scheck for /lib64, then for /lib if determining the openssl library location. Revision ChangesPath 1.4 +6 -4 jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- tcnative.m4 23 May 2005 11:49:25 - 1.3 +++ tcnative.m4 23 May 2005 12:23:10 - 1.4 @@ -280,10 +280,12 @@ saved_LDFLAGS=$LDFLAGS saved_LIBS=$LIBS if test x$tcn_ssltk_base != x; then -if test -d $tcn_ssltk_base/lib; then - ap_ssltk_lib=$tcn_ssltk_base/lib +if test -d $tcn_ssltk_base/lib64; then + tcn_ssltk_lib=$tcn_ssltk_base/lib64 +elif test -d $tcn_ssltk_base/lib; then + tcn_ssltk_lib=$tcn_ssltk_base/lib else - ap_ssltk_lib=$tcn_ssltk_base + tcn_ssltk_lib=$tcn_ssltk_base fi LDFLAGS=$LDFLAGS -L$tcn_ssltk_lib fi @@ -314,7 +316,7 @@ fi dnl (c) hook up linker paths if test x$tcn_ssltk_lib != x; then -APR_ADDTO(LDFLAGS, [-L$tcn_ssltk_lib]) +APR_ADDTO(TCNATIVE_LDFLAGS, [-L$tcn_ssltk_lib]) fi dnl Adjust configuration based on what we found above. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jni/native/build tcnative.m4
mturk 2005/05/23 05:43:46 Modified:jni/native/build tcnative.m4 Log: Make sure we are using at least OpenSSL 0.9.7 version. Revision ChangesPath 1.5 +3 -4 jakarta-tomcat-connectors/jni/native/build/tcnative.m4 Index: tcnative.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/build/tcnative.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- tcnative.m4 23 May 2005 12:23:10 - 1.4 +++ tcnative.m4 23 May 2005 12:43:46 - 1.5 @@ -242,11 +242,10 @@ dnl so it's OpenSSL - test for a good version AC_TRY_COMPILE([#include openssl/opensslv.h],[ #if !defined(OPENSSL_VERSION_NUMBER) -#error Missing openssl version + #error Missing openssl version #endif -#if (OPENSSL_VERSION_NUMBER 0x009060af) \ - || ((OPENSSL_VERSION_NUMBER 0x00907000) (OPENSSL_VERSION_NUMBER 0x0090702f)) -#error Insecure openssl version OPENSSL_VERSION_TEXT +#if (OPENSSL_VERSION_NUMBER 0x0090702f)) + #error Unsuported openssl version OPENSSL_VERSION_TEXT #endif], [AC_MSG_RESULT(OK)], [dnl Replace this with OPENSSL_VERSION_TEXT from opensslv.h? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]