Changeset 9802 for trunk/psLib/configure.ac
- Timestamp:
- Oct 30, 2006, 6:36:19 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/configure.ac (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/configure.ac
r9800 r9802 115 115 dnl ----------------- MYSQL options -------------------- 116 116 117 dnl save LIBS/CFLAGS/LDFLAGS 118 TMP_LIBS=${LIBS} 119 TMP_CFLAGS=${CFLAGS} 120 TMP_LDFLAGS=${LDFLAGS} 121 TMP_CPPFLAGS=${CPPFLAGS} 122 123 AC_ARG_ENABLE(mysql, 124 [AS_HELP_STRING(--disable-mysql,Disable MySQL functionality)], 125 [MYSQL_REQ=$enableval], 126 [MYSQL_REQ="yes"]) 127 128 if test "$MYSQL_REQ" == "yes" 129 then 130 AC_MSG_RESULT([enable building MySQL functionality]) 131 AC_ARG_WITH(mysql_config, 132 [AS_HELP_STRING(--with-mysql_config=FILE,Specify location of MYSQL configuration script.)], 133 [MYSQL_CONFIG=$withval], 134 [MYSQL_CONFIG=`which mysql_config`]) 135 AC_CHECK_FILE($MYSQL_CONFIG,[], 136 [AC_MSG_ERROR([MYSQL 4.1.2 or newer is required. http://www.mysql.com or use --with-mysql_config to specify location of ocnfiguration script.])]) 137 138 AC_MSG_CHECKING([MySQL cflags]) 139 MYSQL_CFLAGS="`${MYSQL_CONFIG} --include`" 140 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${MYSQL_CFLAGS}" 141 AC_MSG_RESULT([${MYSQL_CFLAGS}]) 142 143 AC_MSG_CHECKING([MySQL link options]) 144 MYSQL_LIBS="`${MYSQL_CONFIG} --libs`" 145 PSLIB_LIBS="${PSLIB_LIBS=} ${MYSQL_LIBS}" 146 AC_MSG_RESULT([${MYSQL_LIBS}]) 147 AC_SUBST(TST_PSDB,"tst_psDB") dnl enable the test for psDB 148 149 dnl AC_RUN_IFELSE() uses CFLAGS to find mysql_version.h 150 CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}" 151 AC_RUN_IFELSE([AC_LANG_PROGRAM( 152 [[#include <stdlib.h> 153 #include <stdio.h> 154 #include <mysql_version.h> 155 ]],[[int v=MYSQL_VERSION_ID; 156 if (v < 40102) { 157 exit(1); 158 } else { 159 exit(0); 160 } 161 ]])], [], [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.])]) 162 else 163 PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DOMIT_PSDB" 164 AC_MSG_RESULT([disable building MySQL functionality]) 165 fi 166 167 AC_SUBST([MYSQL_CFLAGS]) 168 169 dnl restore the CFLAGS/LDFLAGS 170 LIBS=${TMP_LIBS} 171 CFLAGS=${TMP_CFLAGS} 172 LDFLAGS=${TMP_LDFLAGS} 173 CPPFLAGS=${TMP_CPPFLAGS} 117 AX_LIB_MYSQL([4.1.2], [ 118 PSLIB_CFLAGS="${PSLIB_CFLAGS=} ${MYSQL_CFLAGS}" 119 PSLIB_LIBS="${PSLIB_LIBS=} ${MYSQL_LIBS}" 120 ], [ 121 PSLIB_CFLAGS="${PSLIB_CFLAGS=} -DOMIT_PSDB" 122 ] 123 ) 174 124 175 125 dnl ----------------- CFITSIO options --------------------
Note:
See TracChangeset
for help on using the changeset viewer.
