dnl $Id: configure.ac,v 1.1 2004/01/14 04:59:14 nlevitt Exp $ AC_PREREQ([2.50]) AC_INIT([juice], [0.0.5]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([juice], [0.0.5]) # get our host environment AC_CANONICAL_HOST # checks for progs AC_PROG_CC AC_PROG_LIBTOOL # the following lines try to determine if Java is a 32-bit or 64-bit # application. if test "$JAVA_HOME" != "" && test -x "$JAVA_HOME/bin/java" then type=`file "$JAVA_HOME/bin/java"` case $type in *32-bit*) case $host in x86_64-*linux* | ppc64-*linux* | powerpc64-*linux* | s390x-*linux* | sparc64-*linux*) AC_MSG_ERROR([Mismatch of Java architecture (32-bit) and actual system (64-bit). Consider using the command 'linux32']) ;; esac CFLAGS="$CFLAGS -m32" ;; *64-bit*) ;; *) AC_MSG_ERROR([Cannot determine architecture of $JAVA_HOME/bin/java]) ;; esac else AC_MSG_ERROR([Cannot find Java executable. Is \$JAVA_HOME set correctly?]) fi # Determine the actual size of a pointer (4 or 8 bytes) AC_CHECK_SIZEOF(int *) # check availability of openSSL crypto library AC_CHECK_LIB([crypto], [EVP_CipherInit_ex], [], AC_MSG_ERROR([OpenSSL crypto library not found.])) # we need the pthread library as well AC_CHECK_LIB([pthread], [pthread_mutex_init], [], AC_MSG_ERROR([pthread library not found.])) # use "-no-undefined" on Cygwin to force (trigger) libtool to create # the shared lib "*openSSL4Java.dll.a". If this is not set this library # is not created. Be sure that the LIBS variable above contains _all_ # libraries necessary to build ours, Cygwin does not allow undefined # symbols. case $host in # *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) *-*-cygwin*) LDFLAGS="$LDFLAGS -no-undefined" ;; *) ;; esac # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h pthread.h]) AC_CHECK_HEADERS([openssl/bn.h openssl/evp.h openssl/md5.h openssl/rsa.h openssl/sha.h], [], AC_MSG_ERROR([OpenSSL headers not found.])) AC_CHECK_HEADERS([jni.h], [], AC_MSG_ERROR([JNI headers not found.])) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([EVP_Digest]) AC_CONFIG_FILES([Makefile native/Makefile native/src/Makefile]) AC_OUTPUT