File: configure.ac

package info (click to toggle)
guifications 2.16-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,304 kB
  • ctags: 1,021
  • sloc: ansic: 9,991; sh: 8,958; xml: 1,153; makefile: 184
file content (174 lines) | stat: -rw-r--r-- 3,585 bytes parent folder | download | duplicates (2)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#
# Most of this configure script was ripped from pidgin or the
# pidgin-encryption configure script, thanks guys ;)
#

AC_INIT([pidgin-guifications], [2.16], [guifications-devel@lists.guifications.org])
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(pre_config.h)

AM_INIT_AUTOMAKE([foreign dist-bzip2])

AC_PREREQ([2.50])

AC_PATH_PROG(sedpath, sed)
AC_DISABLE_STATIC

dnl This disables check of libtool for these compilers
CXX=no
F77=no
GCJ=no

dnl # Make sure we have pkg-config
PKG_PROG_PKG_CONFIG()

#
# Setup libtool
#
AM_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"

#
# I'm lazy and figured config.h is the best place for this ;)
#
AC_DEFINE_UNQUOTED(GF_WEBSITE, "http://pidgin.guifications.org", [Guifications Website])

#
# Our header
#

AH_TOP([ /* our header */
#ifndef _GF_CONFIG_H
#define _GF_CONFIG_H
])
AH_BOTTOM([
#endif /* _GF_CONFIG_H */
])

#
# Good o' gettext
#
AC_PROG_INTLTOOL

GETTEXT_PACKAGE=guifications
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used.])

ALL_LINGUAS="bn cs de en_AU en_GB es fr gl he hu it ja mk nl no pt pt_BR ru sk sr sr@Latn sv uk zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT

#
# Look for the C compiler
#
CFLAGS_save="$CFLAGS"
AC_PROG_CC_STDC
CFLAGS="$CFLAGS_save"

AC_ARG_ENABLE(debug, [  --enable-debug          compile with debugging support],,enable_debug=no)
AC_ARG_ENABLE(deprecated, [  --disable-deprecated    compile without deprecated API usage],,enable_deprecated=yes)

if test "x$enable_debug" = "xyes" ; then
	AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
fi

if test "x$enable_deprecated" = no; then
	DEBUG_CFLAGS = "$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
fi
AC_SUBST(DEBUG_CFLAGS)

if test "x$GCC" = "xyes"; then
	CFLAGS="$CFLAGS -Wall -g3"
fi
AC_SUBST(CFLAGS)

#
# Check for pidgin 
#

PKG_CHECK_MODULES(PIDGIN, pidgin purple)

if test x"$prefix" = x"NONE" ; then
	PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
	PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
else
	PIDGIN_LIBDIR="$libdir"
	PIDGIN_DATADIR="$datadir"
fi

AC_SUBST(PIDGIN_CFLAGS)
AC_SUBST(PIDGIN_LIBS)
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_LIBS)
AC_SUBST(PIDGIN_LIBDIR)
AC_SUBST(PIDGIN_DATADIR)

#
# check for gtk and other dependencies
#
PKG_CHECK_MODULES(GLIB, [glib-2.0])
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)

PKG_CHECK_MODULES(GTK, [gtk+-2.0])
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)

#
# check for freetype 2
#

PKG_CHECK_MODULES(PANGOFT2, pangoft2 >= 1.1.0, 	 
[
	AC_DEFINE(HAVE_PANGOFT2, 1, [Define if we've found pangoft2.])
])
AC_SUBST(PANGOFT2_CFLAGS)
AC_SUBST(PANGOFT2_LIBS)

#
# Check if plugins are enabled
#
want_plugins=yes
AM_CONDITIONAL(PLUGINS, test "$want_plugins" = "yes")

#
# Version stuff
#
AC_CONFIG_COMMANDS_PRE([
	if test -e VERSION; then
		cp -p VERSION VERSION.ac-save
	fi
])

AC_CONFIG_COMMANDS_POST([
	cmp VERSION VERSION.ac-save || touch -r VERSION.ac-save VERSION
	rm -f VERSION.ac-save
])

#
# Finish up
#
AC_OUTPUT([Makefile
		   VERSION
		   pidgin-guifications.spec
		   doc/Makefile
		   nsis/Makefile
		   nsis/translations/Makefile
		   pixmaps/Makefile
		   po/Makefile.in
		   src/Makefile
		   themes/Makefile
		   themes/default/Makefile
		   themes/funky/Makefile
		   themes/mini/Makefile
		   themes/Penguins/Makefile
		  ])

echo;
echo Configuration complete
echo;
echo Debugging enabled..............: $enable_debug
echo Deprecated API enabled.........: $enable_deprecated
echo;
echo Type make to compile
echo Thank you for using Guifications
echo;