File: configure.in

package info (click to toggle)
iptux 0.5.1-2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,964 kB
  • ctags: 1,017
  • sloc: cpp: 12,548; sh: 8,171; makefile: 119; ansic: 13
file content (112 lines) | stat: -rwxr-xr-x 3,578 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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.63)
AC_INIT(configure.in)
AC_CONFIG_SRCDIR(src/iptux.cpp)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(iptux, 0.5.1)

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h locale.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/socket.h sys/time.h sys/vfs.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT64_T
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS([bzero endpwent getcwd gettimeofday memchr memmove mkdir rmdir select setlocale socket strcasecmp strchr strerror strncasecmp strpbrk strrchr strspn strstr])

AC_DEFINE(__IP_TUX__)
AC_ARG_ENABLE(message,
		[  --disable-message       disable print message], ,
		enable_message=yes)
if test "${enable_message}" = yes ; then
AC_DEFINE(MESSAGE)
fi
AC_ARG_ENABLE(warning,
		[  --disable-warning       disable print warning], ,
		enable_warning=yes)
if test "${enable_warning}" = yes ; then
AC_DEFINE(WARNING)
fi
AC_ARG_ENABLE(trace,
		[  --enable-trace          enable print trace], ,
		enable_trace=no)
if test "${enable_trace}" = yes ; then
AC_DEFINE(TRACE)
fi

dnl In Autoconf 2.63, ${bindir} -> ${exec_prefix}
dnl In Autoconf 2.63, ${datadir} --> ${datarootdir} --> ${prefix}
test "${prefix}" = NONE && prefix="${ac_default_prefix}"
test "${exec_prefix}" = NONE && exec_prefix="${prefix}"
tmpdir=`eval echo ${bindir}`
AC_DEFINE_UNQUOTED(__EXEC_PATH, "${tmpdir}")
tmpdir=`eval echo ${datadir}`
tmpdir=`eval echo ${tmpdir}`
AC_DEFINE_UNQUOTED(__DATA_PATH, "${tmpdir}")
localedir="${tmpdir}/locale"
AC_DEFINE_UNQUOTED(__LOCALE_PATH, "${localedir}")
desktopdir="${tmpdir}/applications"
AC_DEFINE_UNQUOTED(__DESKTOP_PATH, "${desktopdir}")
AC_SUBST(desktopdir)
logodir="${tmpdir}/icons"
AC_DEFINE_UNQUOTED(__LOGO_PATH, "${logodir}")
AC_SUBST(logodir)
pixmapsdir="${tmpdir}/iptux/pixmaps"
AC_DEFINE_UNQUOTED(__PIXMAPS_PATH, "${pixmapsdir}")
AC_SUBST(pixmapsdir)
sounddir="${tmpdir}/iptux/sound"
AC_DEFINE_UNQUOTED(__SOUND_PATH, "${sounddir}")
AC_SUBST(sounddir)

glib_modules="glib-2.0 >= 2.16.0"
PKG_CHECK_MODULES(GLIB, [$glib_modules])
gthread_modules="gthread-2.0 >= 2.14.0"
PKG_CHECK_MODULES(GTHREAD, [$gthread_modules])
gtk_modules="gtk+-2.0 >= 2.12.0"
PKG_CHECK_MODULES(GTK, [$gtk_modules])
gconf_modules="gconf-2.0 >= 2.4.0"
PKG_CHECK_MODULES(GCONF, [$gconf_modules])
gst_modules="gstreamer-0.10 >= 0.10.0"
PKG_CHECK_MODULES(GST, [$gst_modules], have_gst=yes, have_gst=no)
if test "${have_gst}" = yes ; then
AC_DEFINE(HAVE_GST)
else
AC_MSG_WARN(You need GStreamer-0.10 or later installed if you need sound relevant functions)
fi
PACKAGE_CFLAGS="${GLIB_CFLAGS} ${GTHREAD_CFLAGS} ${GTK_CFLAGS} ${GCONF_CFLAGS} ${GST_CFLAGS}"
PACKAGE_LIBS="${GLIB_LIBS} ${GTHREAD_LIBS} ${GTK_LIBS} ${GCONF_LIBS} ${GST_LIBS}"
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

GETTEXT_PACKAGE=iptux
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "${GETTEXT_PACKAGE}")

dnl Add the languages which your application supports here.
ALL_LINGUAS="de en_GB es zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT

AC_OUTPUT(Makefile desktop/Makefile pixmaps/Makefile po/Makefile.in sound/Makefile \
	src/Makefile src/uninstall/Makefile)