File: configure.in

package info (click to toggle)
diasce 1.0.5-1.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,964 kB
  • ctags: 1,732
  • sloc: ansic: 26,805; sh: 2,999; makefile: 399; yacc: 318
file content (236 lines) | stat: -rw-r--r-- 5,168 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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)

AC_PREREQ(2.13)
AM_INIT_AUTOMAKE(diasce, 1.0.5)
AM_CONFIG_HEADER(config.h)

AC_PROG_INSTALL

AC_PROG_CC

AC_LANG_C

dnl Add the languages wich your aplication supports here.
ALL_LINGUAS="es es_MX fr eu"
AM_GNU_GETTEXT

dnl Set PACKAGE_LOCALE_DIR in configure.h.
if test "x${prefix}" = "xNONE"; then
	AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
	AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")

dnl Subst PACKAGE_PIXMAPS_DIR and set it in config.h.
if test "x${prefix}" = "xNONE"; then
	AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${ac_default_prefix}/share/pixmaps/${PACKAGE}")
	PACKAGE_PIXMAPS_DIR="${ac_default_prefix}/share/pixmaps/${PACKAGE}"
else
	AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${prefix}/share/pixmaps/${PACKAGE}")
	PACKAGE_PIXMAPS_DIR="${prefix}/share/pixmaps/${PACKAGE}"
fi
AC_SUBST(PACKAGE_PIXMAPS_DIR)

dnl Subst PACKAGE_DATA_DIR and set it in config.h.
if test "x${prefix}" = "xNONE"; then
	AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
	PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
else
	AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
	PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
fi
AC_SUBST(PACKAGE_DATA_DIR)

dnl Try to autodetect system type
AC_CHECK_PROG(SYSTEM_TYPE,uname,`uname -s`,"FALSE")
if test "x${SYSTEM_TYPE}" = "xFALSE"; then
	UNAME_DEFS=""
else
	case $SYSTEM_TYPE in
	Linux)
		UNAME_DEFS="-D_LINUX"
		;;
	FreeBSD)
		UNAME_DEFS="-D_FREEBSD"
		;;
	NetBSD)
		UNAME_DEFS="-D_NETBSD"
		;;
	BSD/OS)
		UNAME_DEFS="-D_BSD_OS"
		;;
	OpenBSD)
		UNAME_DEFS="-D_OPENBSD"
		;;
	SunOS)
		UNAME_DEFS="-D_SUNOS"
		;;
	QNX)
		UNAME_DEFS="-D_QNX"
		;;
	Darwin)
		UNAME_DEFS="-D_DARWIN"
		;;
	IRIX*)
		UNAME_DEFS="-D_IRIX"
		;;
	HP-UX*)
		UNAME_DEFS="-D_HP_UX"
		;;
	[cC][yY][gG][wW][iI][nN]*)
		UNAME_DEFS="-D_CYGWIN"
		;;
	*)
		UNAME_DEFS=""
		;;
	esac
fi

CFLAGS="$UNAME_DEFS  -O2  -Wall"

dnl Looking for configuration scripts.
AC_CHECK_PROG(XML_INC,xml-config,`xml-config --cflags`)
AC_SUBST(XML_INC)
AC_CHECK_PROG(GTK_INC,gtk-config,`gtk-config --cflags gtk`)
AC_SUBST(GTK_INC)
AC_CHECK_PROG(GNOME_INC,gnome-config,`gnome-config --cflags gnome`)
AC_SUBST(GNOME_INC)
AC_CHECK_PROG(GLIB_INC,glib-config,`glib-config --cflags glib`)
AC_SUBST(GLIB_INC)
AC_CHECK_PROG(GNOMEUI_INC,gnome-config,`gnome-config --cflags gnomeui`)
AC_SUBST(GNOMEUI_INC)
AC_CHECK_PROG(AUDIOFILE_INC,audiofile-config,`audiofile-config --cflags`)
AC_SUBST(AUDIOFILE_INC)
AC_CHECK_PROG(ESD_INC,esd-config,`esd-config --cflags`)
AC_SUBST(ESD_INC)
AC_CHECK_PROG(GMODULE_INC,glib-config,`glib-config --cflags gmodule`)
AC_SUBST(GMODULE_INC)

dnl Looking for libraries.
GLIB_LIB2=`glib-config --libs glib`
GLIB_LIB=""
for i in $GLIB_LIB2 ; do
	case $i in 
		-l*) GLIB_LIB="$i $GLIB_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $GLIB_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
XML_LIB2=`xml-config --libs`
XML_LIB=""
for i in $XML_LIB2 ; do
	case $i in 
		-l*) XML_LIB="$i $XML_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $XML_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
LIBS="-L/usr/X11R6/lib $LIBS"
AC_CHECK_LIB(ICE,main)
AC_CHECK_LIB(SM,main)
AC_CHECK_LIB(Xext,main)
AC_CHECK_LIB(X11,main)
AC_CHECK_LIB(Xi,main)
GMODULE_LIB2=`glib-config --libs gmodule`
GMODULE_LIB=""
for i in $GMODULE_LIB2 ; do
	case $i in 
		-l*) GMODULE_LIB="$i $GMODULE_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $GMODULE_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
GTK_LIB2=`gtk-config --libs gtk`
GTK_LIB=""
for i in $GTK_LIB2 ; do
	case $i in 
		-l*) GTK_LIB="$i $GTK_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $GTK_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
AUDIOFILE_LIB2=`audiofile-config --libs`
AUDIOFILE_LIB=""
for i in $AUDIOFILE_LIB2 ; do
	case $i in 
		-l*) AUDIOFILE_LIB="$i $AUDIOFILE_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $AUDIOFILE_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
ESD_LIB2=`esd-config --libs`
ESD_LIB=""
for i in $ESD_LIB2 ; do
	case $i in 
		-l*) ESD_LIB="$i $ESD_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $ESD_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
GNOME_LIB2=`gnome-config --libs gnome`
GNOME_LIB=""
for i in $GNOME_LIB2 ; do
	case $i in 
		-l*) GNOME_LIB="$i $GNOME_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $GNOME_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
GNOMEUI_LIB2=`gnome-config --libs gnomeui`
GNOMEUI_LIB=""
for i in $GNOMEUI_LIB2 ; do
	case $i in 
		-l*) GNOMEUI_LIB="$i $GNOMEUI_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $GNOMEUI_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done
USER_LIBS="-lgnuregex "
USER_LIB=""
for i in $USER_LIBS ; do
	case $i in 
		-l*) USER_LIB="$i $USER_LIB" ;;
		-L*) LIBS="$i $LIBS" ;;
	esac
done
for i in $USER_LIB ; do
	j=${i#'-l'}
	AC_CHECK_LIB($j,main)
done

AC_OUTPUT([
Makefile
src/Makefile
po/Makefile.in
intl/Makefile
])