forked from iptux-src/iptux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·137 lines (124 loc) · 4.95 KB
/
configure.ac
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT(iptux, 0.6.3, [https://github.com/iptux-src/iptux/issues])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR(config.h.in)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE(foreign dist-bzip2 -Wall)
# 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 unistd.h, [],
AC_MSG_ERROR([Couldn't find some header file]))
# 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
AH_TEMPLATE([GETTEXT_PACKAGE], [Gettext Package])
AH_TEMPLATE([__EXEC_PATH], [System Execute Directory])
AH_TEMPLATE([__DATA_PATH], [System Data Directory])
AH_TEMPLATE([__LOCALE_PATH], [System Locale Directory])
AH_TEMPLATE([__DESKTOP_PATH], [System Applications Directory])
AH_TEMPLATE([__LOGO_PATH], [Iptux Logo Directory])
AH_TEMPLATE([__PIXMAPS_PATH], [Iptux Pixmaps Directory])
AH_TEMPLATE([__SOUND_PATH], [Iptux Sound Directory])
AH_TEMPLATE([__IP_TUX__], [Define if you want to use defined macros for iptux])
AH_TEMPLATE([HAVE_GST], [Define if you system has installed gstreamer already])
AH_TEMPLATE([MESSAGE], [Define if you want to print message])
AH_TEMPLATE([WARNING], [Define if you want to print warning])
AH_TEMPLATE([TRACE], [Define if you want to print trace])
# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS(bzero endpwent getcwd gettimeofday inet_ntoa memchr memmove \
mkdir rmdir setlocale socket strcasecmp strchr strerror \
strncasecmp strpbrk strrchr strspn)
AC_DEFINE(__IP_TUX__)
AC_ARG_ENABLE([message],
AS_HELP_STRING([--disable-message],
[disable print message @<:@default=yes@:>@]),
[enable_message=$enableval],
[enable_message=yes])
if test "x${enable_message}" = "xyes" ; then
AC_DEFINE(MESSAGE, 1, [Define if you want to print message])
fi
AC_ARG_ENABLE([warning],
AS_HELP_STRING([--disable-warning],
[disable print warning @<:@default=yes@:>@]),
[enable_warning=$enableval],
[enable_warning=yes])
if test "x${enable_warning}" = "xyes" ; then
AC_DEFINE(WARNING, 1, [Define if you want to print warning])
fi
AC_ARG_ENABLE([trace],
AS_HELP_STRING([--enable-trace],
[enable print trace @<:@default=no@:>@]),
[enable_trace=$enableval],
[enable_trace=no])
if test "x${enable_trace}" = "xyes" ; then
AC_DEFINE(TRACE, 1, [Define if you want to print trace])
fi
dnl In Autoconf 2.63, ${bindir} --> ${exec_prefix}
dnl In Autoconf 2.63, ${datadir} --> ${datarootdir} --> ${prefix}
test "x${prefix}" = xNONE && prefix="${ac_default_prefix}"
test "x${exec_prefix}" = xNONE && 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-1.0 >= 1.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-1.0 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 pl 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)