File: configure.in

package info (click to toggle)
mysql-ocaml 1.0.4-2%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 728 kB
  • ctags: 717
  • sloc: sh: 2,278; ml: 599; ansic: 531; makefile: 74; perl: 41
file content (67 lines) | stat: -rw-r--r-- 1,732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
AC_INIT(mysql.mli)

AC_MSG_CHECKING(for version)
VERSION="`etc/shtool version -l txt -d short VERSION`"
AC_MSG_RESULT "Configuring Version $VERSION"
AC_SUBST(VERSION)


AC_MSG_CHECKING(for platform)
ARCH="`etc/shtool guessos`"
AC_MSG_RESULT "$ARCH"
AC_SUBST(ARCH)
AC_CHECKING(for ocaml compiler and tools)
AC_CHECK_PROG(ocamlc,ocamlc,ocamlc)
AC_CHECK_PROG(ocamlopt,ocamlopt,ocamlopt)
AC_CHECK_PROG(ocamlfind,ocamlfind,ocamlfind)

AC_PROG_INSTALL
AC_SUBST(INSTALL)

AC_CHECKING(for C compiler)
AC_PROG_CC

AC_CHECKING(for C header files)
AC_HEADER_STDC

AC_CHECKING(libraries)

dnl First see if we can link to mysql without any special flags...
AC_CHECKING(for MySQL library)
AC_CHECK_LIB(mysqlclient, mysql_real_connect)
dnl If not, look in a bunch of typical places.
if test "$ac_cv_lib_mysqlclient_mysql_real_connect" == "no"; then
	dirs="/usr/local/lib/mysql
	      /usr/local/mysql/lib
	      /usr/local/mysql/lib/mysql
	      /usr/local/lib
	      /usr/lib
	      /usr/lib/mysql
	      /sw/lib/mysql"      
	for d in $dirs; do
  	  	test -f "$d/libmysqlclient.a" && LDFLAGS="-L$d"
	done
	AC_CHECKING(in more locations)
        unset ac_cv_lib_mysqlclient_mysql_real_connect
	AC_CHECK_LIB(mysqlclient, mysql_real_connect)
fi
AC_CHECK_LIB(z, compress)

AC_CHECKING(for MySQL header files)
AC_CHECK_HEADER(mysql/mysql.h)
if test "$ac_cv_header_mysql_mysql_h" = "no"; then
	dirs="/usr/local/include
	      /usr/local/mysql/include
	      /usr/include
	      /usr/include/mysql
              /sw/include"      
	for d in $dirs; do
	    test -f "$d/mysql/mysql.h" && CFLAGS="$CFLAGS -I$d" 
	done
	unset ac_cv_header_mysql_mysql_h
	AC_CHECKING(in more locations)
	AC_CHECK_HEADER(mysql/mysql.h)
fi

AC_OUTPUT(Makefile)
AC_OUTPUT(META)