source: trunk/FACT++/.macro_dir/mysql_devel.m4@ 12395

Last change on this file since 12395 was 10319, checked in by tbretz, 14 years ago
Removed two obsolete macro calls.
File size: 1.2 KB
Line 
1dnl @synopsis MYSQL_DEVEL
2dnl
3dnl This macro tries to find MySQL C API header locations.
4dnl
5dnl Based on MYSQL_C_API_LOCATION from
6dnl
7dnl @version 1.4, 2009/05/28
8dnl @author Warren Young <mysqlpp@etr-usa.com>
9dnl
10AC_DEFUN([MYSQL_DEVEL],
11[
12 MYSQL_inc_check="/usr/include/mysql /usr/local/include/mysql /usr/local/mysql/include /usr/local/mysql/include/mysql /usr/mysql/include/mysql /opt/mysql/include/mysql /sw/include/mysql"
13 AC_ARG_WITH(mysql-include,
14 [ --with-mysql-include=<path> directory path of MySQL header installation],
15 [MYSQL_inc_check="$with_mysql_include $with_mysql_include/include $with_mysql_include/include/mysql"])
16
17 #
18 # Look for MySQL C API headers
19 #
20 AC_MSG_CHECKING([for MySQL include directory])
21 MYSQL_C_INC_DIR=
22 for m in $MYSQL_inc_check
23 do
24 if test -d "$m" && test -f "$m/mysql.h"
25 then
26 MYSQL_C_INC_DIR=$m
27 break
28 fi
29 done
30
31 if test -z "$MYSQL_C_INC_DIR"
32 then
33 AC_MSG_ERROR([Didn't find the MySQL include dir in '$MYSQL_inc_check'])
34 fi
35
36 case "$MYSQL_C_INC_DIR" in
37 /* ) ;;
38 * ) AC_MSG_ERROR([The MySQL include directory ($MYSQL_C_INC_DIR) must be an absolute path.]) ;;
39 esac
40
41 AC_MSG_RESULT([$MYSQL_C_INC_DIR])
42
43 CPPFLAGS="$CPPFLAGS -I${MYSQL_C_INC_DIR}"
44
45 AC_SUBST(MYSQL_C_INC_DIR)
46]) dnl MYSQL_DEVEL
47
Note: See TracBrowser for help on using the repository browser.