1dnl OPT++ Options 2 3AC_DEFUN([OPTPP_OPTIONS],[ 4 5dnl Check for BLAS library. 6 7 AC_F77_LIBRARY_LDFLAGS 8 ACX_BLAS 9 AM_CONDITIONAL([HAVE_BLAS], [test "x$acx_blas_ok" = xyes]) 10 11dnl Check for and set up MPI to build parallel OPT++. 12 13 have_mpi=no 14 AC_ARG_ENABLE(mpi, AC_HELP_STRING([--enable-mpi], 15 [build parallel version of OPT++]), 16 [enable_mpi=$enableval], [enable_mpi=no]) 17 18 if test "x$enable_mpi" = xyes; then 19 ACX_MPI([CXX="$MPICXX" AC_LANG_PUSH([C]) ACX_MPI([CC="$MPICC" 20 LIBS="$MPILIBS $LIBS" have_mpi=yes]) AC_LANG_POP([C])]) 21 22 dnl GM-MPI option check. 23# AC_ARG_ENABLE([gm],AS_HELP_STRING([--enable-gm],[turn GM support on]), 24# [enable_gm=$enableval],[enable_gm=no]) 25# if test "x$enable_gm" = xyes; then 26# AC_CHECK_LIB([gm],[gm_init],MPILIBS="$MPILIBS -lgm") 27# fi 28 fi 29 30 if test "x$have_mpi" = xyes; then 31 AC_CHECK_LIB([mpich], [MPI_Get_version], [CXXFLAGS="$CXXFLAGS -DMPICH_IGNORE_CXX_SEEK"]) 32 AC_DEFINE(WITH_MPI, 1, [Define if you are building parallel OPT++.]) 33 AC_DEFINE(SHARED, 1, [Define if you have a shared file system.]) 34 fi 35 AM_CONDITIONAL([HAVE_MPI], [test "x$have_mpi" = xyes]) 36 37 have_xml=no 38 AM_CONDITIONAL([HAVE_XML], [test "x$have_xml" = xyes]) 39 40dnl Check for and set up to build with NPSOL. 41 42 have_npsol=no 43 AC_ARG_WITH(npsol, [AC_HELP_STRING([--with-npsol=<lib>], 44 [use NPSOL library <lib>])]) 45 46 case $with_npsol in 47 yes) ;; 48 no | "") have_npsol=disable ;; 49 -* | */* | *.a | *.so | *.so.* | *.o) NPSOL_LIB="$with_npsol" ;; 50 *) NPSOL_LIB="-l$with_npsol" ;; 51 esac 52 53 if test $have_npsol = no; then 54 if test "x$NPSOL_LIB" = x; then 55 NPSOL_LIB="" 56 else 57 AC_MSG_CHECKING([for $NPSOL_LIB]) 58 if test -f $NPSOL_LIB; then 59 have_npsol=yes 60 else 61 NPSOL="" 62 fi 63 AC_MSG_RESULT($have_npsol) 64 fi 65 fi 66 67 if test $have_npsol = no; then 68 AC_MSG_CHECKING([for /usr/local/lib/libnpsol.a]) 69 if test -f "/usr/local/lib/libnpsol.a"; then 70 have_npsol=yes 71 NPSOL_LIB="/usr/local/lib/libnpsol.a" 72 else 73 NPSOL_LIB="" 74 fi 75 AC_MSG_RESULT($have_npsol) 76 fi 77 78 if test $have_npsol = no; then 79 AC_MSG_CHECKING([for /usr/local/lib/npsol.a]) 80 if test -f "/usr/local/lib/npsol.a"; then 81 have_npsol=yes 82 NPSOL_LIB="/usr/local/lib/npsol.a" 83 else 84 NPSOL_LIB="" 85 fi 86 AC_MSG_RESULT($have_npsol) 87 fi 88 89 if test $have_npsol = no; then 90 AC_MSG_CHECKING([for /usr/lib/libnpsol.a]) 91 if test -f "/usr/lib/libnpsol.a"; then 92 have_npsol=yes 93 NPSOL_LIB="/usr/lib/libnpsol.a" 94 else 95 NPSOL_LIB="" 96 fi 97 AC_MSG_RESULT($have_npsol) 98 fi 99 100 if test $have_npsol = no; then 101 AC_MSG_CHECKING([for /usr/lib/npsol.a]) 102 if test -f "/usr/lib/npsol.a"; then 103 have_npsol=yes 104 NPSOL_LIB="/usr/lib/npsol.a" 105 else 106 NPSOL_LIB="" 107 fi 108 AC_MSG_RESULT($have_npsol) 109 fi 110 111 AC_SUBST(NPSOL_LIB) 112 AM_CONDITIONAL([HAVE_NPSOL], [test "x$have_npsol" = xyes]) 113 114dnl Check for doxygen to build HTML documentation. 115 116 AC_ARG_ENABLE(html-docs, AC_HELP_STRING([--enable-html-docs], 117 [build HTML documentation using doxygen]), 118 [enable_html_docs=$enableval], [enable_html_docs=no]) 119 120 if test "x$enable_html_docs" = xyes; then 121 AC_CHECK_PROG(DOXYGEN, doxygen, doxygen) 122 if test "x$DOXYGEN" = x; then 123 have_doxygen=no 124 else 125 have_doxygen=yes 126 fi 127 else 128 have_doxygen=no 129 fi 130 131 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = xyes]) 132 133]) 134