File: configure.ac

package info (click to toggle)
mysql++ 2.0.7-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 8,548 kB
  • ctags: 2,792
  • sloc: cpp: 35,566; sh: 8,517; xml: 2,769; perl: 752; makefile: 178
file content (116 lines) | stat: -rw-r--r-- 3,431 bytes parent folder | download
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with MySQL++; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA


# Don't forget to change libtool version below.
AC_INIT(mysql++, 2.0.7, plusplus@lists.mysql.com, mysql++)

# Libtool version scheme is: interface:change:age.  Interface number
# goes up any time the library interface changes.  Change number goes up
# any time library changes without affecting interface.  Age goes up any
# time interface changes without breaking backwards compatibility, such
# as by adding new functions; must always be less than interface number.
AC_SUBST(MYSQLPP_LIBTOOL_VERSION, [2:7:0])

# Break package version up into major, minor and bugfix components.
# Avoid temptation to use these to define MYSQLPP_LIBTOOL_VERSION:
# only in the x.0.0 case do these two schemes take the same values!
MYSQLPP_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -f1 -d.`
AC_SUBST(MYSQLPP_VERSION_MAJOR)
MYSQLPP_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -f2 -d.`
AC_SUBST(MYSQLPP_VERSION_MINOR)
MYSQLPP_VERSION_BUGFIX=`echo $PACKAGE_VERSION | cut -f3 -d.`
AC_SUBST(MYSQLPP_VERSION_BUGFIX)

# Standard autotools stuff
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_PROG_MAKE_SET
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AM_MAINTAINER_MODE


# Checks for build system tools
AC_PROG_CC
AC_PROG_CXX


# Checks for Standard C support
AC_HEADER_STDC
AC_C_CONST
AC_CHECK_FUNCS(strtol)


# Figure out whether/how to handle threading support, if available.
AC_ARG_ENABLE(thread-check,
		[  --enable-thread-check  Check for threads, and use if available. ],
		[ thread_check=yes ])
if test "x$thread_check" = "xyes"
then
	ACX_PTHREAD
	LIBS="$PTHREAD_LIBS $LIBS"
	CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
	CC="$PTHREAD_CC"
fi


# Checks for libraries and local system features
AC_CHECK_HEADERS(zlib.h, AC_CHECK_LIB(z, gzread, [],
		[ AC_MSG_ERROR([zlib is required]) ]))
LIB_MATH
LIB_SOCKET_NSL
MYSQL_API_LOCATION
MYSQL_SHUTDOWN_ARG
MYSQL_WITH_SSL
AC_CHECK_LIB(intl, main)
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
AM_WITH_DMALLOC()


# Check for Standard C++ support, and extensions.  This must be near
# the end, because the CPLUSPLUS directive makes autoconf use C++
# compiler for all subsequent tests!
AC_LANG_CPLUSPLUS
STL_SLIST_EXTENSION


# Decide if examples are to be built or not.
AC_ARG_ENABLE(examples,
		[  --enable-examples  Build the examples (built by default) ],
		[ build_examples=$enableval ],
		[ build_examples=yes ])
if test "x$build_examples" = xyes
then
	OPTIONAL_EXAMPLES=examples
	echo will build examples
else
	OPTIONAL_EXAMPLES= 
	echo will NOT build examples
fi
AC_SUBST([OPTIONAL_EXAMPLES])


#
# Done with checks!
#
AC_OUTPUT([Makefile mysql++.spec lib/mysql++.h lib/Makefile lib/Doxyfile])
if test "x$OPTIONAL_EXAMPLES" != "x"
then
	AC_OUTPUT([examples/Makefile])
fi

./makemake.sh simple gcc