--- Yap-5.1.2.orig/configure.in 2007-06-21 01:45:42.000000000 +1200 +++ Yap-5.1.2/configure.in 2007-11-23 20:20:36.000000000 +1300 @@ -43,7 +43,7 @@ [ --enable-threads support system threads ], threads="$enableval", threads=no) AC_ARG_ENABLE(pthread-locking, - [ --pthread-locking use pthread locking primitives for internal locking (requires threads) ], + [ --enable-pthread-locking use pthread locking primitives for internal locking (requires threads) ], pthreadlocking="$enableval", pthreadlocking=no) AC_ARG_ENABLE(max-performance, [ --enable-max-performance try using the best flags for specific architecture ], @@ -91,22 +91,35 @@ fi, [yap_cv_gmp=yes]) -AC_ARG_ENABLE(myddas, - [ --enable-myddas[[=DIR]] enable the MYDDAS library], +AC_ARG_ENABLE(myddas-mysql, + [ --enable-myddas-mysql[[=DIR]] enable the MYDDAS MySQL library], if test "$enableval" = yes; then - yap_cv_myddas=/usr/ + yap_cv_myddas_mysql=/usr/ elif test "$enableval" = no; then - yap_cv_myddas=no + yap_cv_myddas_mysql=no else - yap_cv_myddas=$enable_myddas - LDFLAGS="$LDFLAGS -L${yap_cv_myddas}/lib " - CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas}/include " + yap_cv_myddas_mysql=$enable_myddas_mysql + LDFLAGS="$LDFLAGS -L${yap_cv_myddas_mysql}/lib " + CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas_mysql}/include " fi, - [yap_cv_myddas=no]) + [yap_cv_myddas_mysql=no]) + +AC_ARG_ENABLE(myddas-odbc, + [ --enable-myddas-odbc[[=DIR]] enable the MYDDAS ODBC library], + if test "$enableval" = yes; then + yap_cv_myddas_odbc=/usr/ + elif test "$enableval" = no; then + yap_cv_myddas_odbc=no + else + yap_cv_myddas_odbc=$enable_myddas_odbc + LDFLAGS="$LDFLAGS -L${yap_cv_myddas_odbc}/lib " + CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas_odbc}/include " + fi, + [yap_cv_myddas_odbc=no]) AC_ARG_ENABLE(myddas-stats, [ --enable-myddas-stats enable the MYDDAS library statistics support], - if test "$yap_cv_myddas" = no; then + if test "$yap_cv_myddas_mysql" = no; then myddasstats=no else myddasstats="$enableval" @@ -114,7 +127,7 @@ AC_ARG_ENABLE(myddas-top-level, [ --enable-myddas-top-level enable the MYDDAS top-level support to MySQL], - if test "$yap_cv_myddas" = no; then + if test "$yap_cv_myddas_mysql" = no; then myddastoplevel=no else myddastoplevel="$enableval" @@ -124,8 +137,6 @@ [ --with-jpl=JAVA_HOME use Java instalation in JAVA_HOME], if test "$withval" = yes; then yap_cv_jpl="$JAVA_HOME" - dynamic_loading=yes - maxmemory=yes dnl threads=yes elif test "$withval" = no; then yap_cv_jpl=no @@ -410,6 +421,8 @@ AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin) AC_PATH_PROG(SHELL,sh) +AC_HEADER_STDC + dnl Check for libraries. dnl mingw does not get along well with libm dnl cygnus and mingw32 also need wsock32 to use sockets. @@ -464,7 +477,7 @@ AC_CHECK_LIB(gmp,main) fi -if test "$yap_cv_myddas" != "no" +if test "$yap_cv_myddas_mysql" != "no" then dnl check for mysql AC_MSG_CHECKING(for main in -lmysqlclient) @@ -481,9 +494,26 @@ if test "$yap_mysql" = yes then YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL" - LIBS="$LIBS -L${yap_cv_myddas}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv " + LIBS="$LIBS -L${yap_cv_myddas_mysql}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv " fi - + if test "$yap_mysql" = no + then + echo "-------------------------------" + echo "--" + echo "--" + echo "--" + echo "-- There\'s no devel libraries for MySQL" + echo "--" + echo "--" + echo "--" + echo "-------------------------------" + exit + fi + cutc="yes" +fi + +if test "$yap_cv_myddas_odbc" != "no" +then dnl check for odbc AC_MSG_CHECKING(for main in -lodbc) AC_CACHE_VAL(yap_odbc,[ @@ -502,40 +532,21 @@ YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_ODBC" LIBS="$LIBS -lodbc " fi - - if test "$yap_mysql" = no -a "$yap_odbc" = no + if test "$yap_odbc" = no then echo "-------------------------------" echo "--" echo "--" echo "--" - echo "-- There\'s no devel libraries for MySQL or ODBC" + echo "-- There\'s no devel libraries for ODBC" echo "--" echo "--" echo "--" echo "-------------------------------" exit fi - - if test "$cutc" = no - then - echo - echo - echo "********************************************************" - echo - echo - echo "!!!!!! WARNING !!!!!!" - echo "The MYDDAS interface makes no sense without cut-c" - echo "Please contact tiagosoares@ncc.up.pt for help" - echo - echo "Enabling cut-c" - echo - echo "********************************************************" - echo - echo - cutc="yes" - fi -fi + cutc="yes" +fi if test "$myddasstats" = "yes" then @@ -623,7 +634,7 @@ OLD_CC=${CC} CC=${LAM_MPI_CC} AC_CHECK_LIB([lam], [main], - LAMOBJS=yap_mpi@SHLIB_SUFFIX@, + LAMOBJS='yap_mpi$(SHLIB_SUFFIX)', LAMOBJS=no) CC=${OLD_CC} @@ -946,7 +957,6 @@ fi dnl Checks for header files. -AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h dlfcn.h) AC_CHECK_HEADERS(errno.h fcntl.h) @@ -965,7 +975,7 @@ then AC_CHECK_HEADERS(gmp.h) fi -if test "$yap_cv_myddas" != "no" +if test "$yap_cv_myddas_mysql" != "no" then AC_CHECK_HEADERS(mysql/mysql.h) fi