File: configure.ac

package info (click to toggle)
mysql%2B%2B 3.2.5-2.3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,356 kB
  • sloc: cpp: 35,788; sh: 3,693; perl: 789; makefile: 728
file content (123 lines) | stat: -rw-r--r-- 3,288 bytes parent folder | download | duplicates (3)
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
117
118
119
120
121
122
123
# 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

# Standard autotools stuff
AC_INIT(mysql++, 3.2.5, plusplus@lists.mysql.com, mysql++)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([config])
AC_CANONICAL_SYSTEM


# Enable libtool to decide shared library compile flags (ie -fPIC)
AC_PROG_LIBTOOL
AC_SUBST([LIBTOOL_DEPS])


# Break package version up into major, minor and bugfix components.
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)


# Check for Standard C support
AC_PROG_CC
AC_HEADER_STDC


# 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"
	AC_CHECK_HEADERS(synch.h)
	AC_CHECK_HEADERS(unistd.h)
fi


# Let caller provide -f to lib/*.pl scripts in a uniform way
AC_ARG_WITH([field-limit],
		AS_HELP_STRING([--with-field-limit=<n>],
			[set max template query and SSQLS field count]),
		[], [])
if test -n "$with_field_limit"
then
	 ( cd lib ;
	   ./querydef.pl -f $with_field_limit ;
	   ./ssqls.pl -f $with_field_limit 
	 )
fi


# Try to find local getopt(); if we fail, we'll use the one in lib/cmdline.*
AC_CHECK_FUNC(getopt, 
		[AC_DEFINE(HAVE_POSIX_GETOPT, [], Define if getopt() is available in unistd.h)],
		[AC_CHECK_LIB(iberty, getopt,
			[AC_DEFINE(HAVE_LIBIBERTY_GETOPT, [], Define if getopt() is available in libiberty.h)],
			[])])


# Checks for libraries and local system features
LIB_MATH
LIB_SOCKET_NSL
MYSQL_C_API_LOCATION
MYSQL_WITH_SSL
AX_C_LOCALTIME_R
AC_CHECK_LIB(intl, main)


# If this is Cygwin, add a linker flag to suppress a silly link message.
case "${host}" in
	*cygwin*)
		LDFLAGS="$LDFLAGS -Wl,--enable-auto-import"
		;;
esac


# 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_PROG_CXX
AC_LANG_CPLUSPLUS
STL_SLIST_EXTENSION


# Include Bakefile macros
AC_BAKEFILE([m4_include(config/autoconf_inc.m4)])


#
# Configure process complete; write out files generated from *.in.
#
AC_OUTPUT([\
	doc/userman/userman.dbx \
	install.hta \
	lib/Doxyfile \
	lib/mysql++.h \
	ssx/Doxyfile \
	abi.xml \
	mysql++.spec \
	Makefile \
	version
])
chmod +x version