File: configure.in

package info (click to toggle)
geoip 1.4.8+dfsg-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,272 kB
  • sloc: ansic: 19,471; sh: 10,137; cpp: 526; perl: 177; makefile: 133; awk: 13
file content (50 lines) | stat: -rw-r--r-- 1,577 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
dnl AM_CONFIG_HEADER(config.h)

AC_INIT([GeoIP], [1.4.8],[support@maxmind.com],[GeoIP])
AC_GNU_SOURCE
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([libGeoIP/GeoIP.c])
GEOIP_VERSION_INFO=`echo $VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
AC_SUBST(GEOIP_VERSION_INFO)

AC_PROG_CC
AC_PROG_LIBTOOL

AC_CHECK_TYPE(byte,[AC_DEFINE(HAVE_BYTE_TYPEDEF)],[])
AC_CHECK_TYPE(ushort,[AC_DEFINE(HAVE_USHORT_TYPEDEF)],[])
AC_CHECK_TYPE(ulong,[AC_DEFINE(HAVE_ULONG_TYPEDEF)],[])
AC_CHECK_TYPE(u16,[AC_DEFINE(HAVE_U16_TYPEDEF)],[])
AC_CHECK_TYPE(u32,[AC_DEFINE(HAVE_U32_TYPEDEF)],[])

AC_C_BIGENDIAN([AC_DEFINE(BIG_ENDIAN_HOST,1)],[AC_DEFINE(LITTLE_ENDIAN_HOST,1)])

AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(zlib.h, , AC_MSG_ERROR(Zlib header (zlib.h) not found. Tor requires zlib to build. You may need to install a zlib development package.))

AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY))
AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF))
AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF))
AC_CHECK_FUNC(vsprintf, AC_DEFINE(HAVE_VSPRINTF))

AC_CHECK_FUNC(gethostbyname, AC_DEFINE(HAVE_GETHOSTBYNAME),
	AC_CHECK_LIB(nsl, gethostbyname, AC_DEFINE(HAVE_GETHOSTBYNAME)
	LIBS="${LIBS} -lsocket -lnsl"))

AC_CHECK_FUNC(gethostbyname_r, [
	AC_DEFINE(HAVE_GETHOSTBYNAME_R)
	# We look for the one that returns `int'.
	# Hopefully this check is robust enough.
	AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [
		AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT)])
	])

AC_OUTPUT([
Makefile
GeoIP.spec
libGeoIP/Makefile
apps/Makefile
conf/Makefile
data/Makefile
man/Makefile
test/Makefile
])