Changeset 3410
- Timestamp:
- Mar 11, 2005, 1:19:01 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/configure.ac (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/configure.ac
r3241 r3410 39 39 dnl Setup the info for psLib for pkg-config 40 40 PSLIB_CFLAGS="-I${includedir}" 41 42 dnl ----------------- MYSQL options -------------------- 43 dnl MYSQL_LDFLAGS="-L${libdir}/mysql" 44 dnl MYSQL_CFLAGS="-I${includedir}/mysql" 45 AC_ARG_ENABLE(mysql, 46 [AC_HELP_STRING([--enable-mysql],[Build MySQL portions of psLib])], 47 [AC_MSG_RESULT([enable building MySQL portions]) 48 MYSQL_REQ="yes"], 49 [AC_MSG_RESULT([disable building MySQL portions])]) 50 51 if test "$MYSQL_REQ" == "yes" 52 then 53 AC_ARG_WITH(mysql, 54 [AC_HELP_STRING([--with-mysql=DIR],[Specify location of MYSQL.])], 55 [MYSQL_CFLAGS="-I$withval/include" 56 MYSQL_LDFLAGS="-L$withval/lib"]) 57 AC_ARG_WITH(mysql-include, 58 [AC_HELP_STRING([--with-mysql-include=DIR],[Specify MYSQL include directory.])], 59 [MYSQL_CFLAGS="-I$withval"]) 60 AC_ARG_WITH(mysql-lib, 61 [AC_HELP_STRING([--with-mysql-lib=DIR],[Specify MYSQL library directory.])], 62 [MYSQL_LDFLAGS="-L$withval"]) 63 CFLAGS="${CFLAGS=} $MYSQL_CFLAGS" 64 PSLIB_LIBS="${PSLIB_LIBS=} $MYSQL_LDFLAGS -lmysql" 65 AC_CHECK_HEADERS([mysql/mysql.h],[], 66 [AC_MSG_ERROR([MySQL 4.1.2 or newer is required. Obtain it at http://www.mysql.com or use --with-mysql to specify location.])]) 67 68 AC_RUN_IFELSE([AC_LANG_PROGRAM( 69 [[#include <stdlib.h> 70 #include <stdio.h> 71 #include <mysql/mysql_version.h> 72 ]],[[int v=MYSQL_VERSION_ID; 73 if (v < 40102) { 74 exit(1); 75 } else { 76 exit(0); 77 } 78 ]])], [], [AC_MSG_ERROR([MySQL 4.1.2 or newer is required. Obtain it at http://www.mysql.com or use --with-mysql to specify location.])]) 79 80 CFLAGS="${CFLAGS=} -DBUILD_PSDB" 81 fi 41 82 42 83 dnl ----------------- CFITSIO options --------------------
Note:
See TracChangeset
for help on using the changeset viewer.
