File: configure.ac

package info (click to toggle)
lingot 1.0.1-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 908 kB
  • sloc: ansic: 6,065; makefile: 145; xml: 47; sh: 7
file content (258 lines) | stat: -rw-r--r-- 6,536 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta - will be overwritten
dnl If you don't want it to overwrite it,
dnl 	Please disable it in the Anjuta project configuration

AC_INIT([Lingot], [1.0.1])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CC_STDC
AC_HEADER_STDC

AC_PROG_INTLTOOL([0.23])

AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources])
PKG_PROG_PKG_CONFIG([0.22])
GLIB_GSETTINGS

GETTEXT_PACKAGE=lingot
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [lingot])

dnl Languages which your application supports
ALL_LINGUAS="ca cs de es gl it pt_BR sv zh_CN fr"
AM_GLIB_GNU_GETTEXT

AC_PROG_LIBTOOL

AC_CHECK_LIB(m, sin)
AC_CHECK_HEADERS([langinfo.h])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_FUNCS([floor])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([mkdir])
AC_CHECK_FUNCS([pow])
AC_CHECK_FUNCS([rint])
AC_CHECK_FUNCS([setlocale])
AC_CHECK_FUNCS([sqrt])
AC_CHECK_FUNCS([strchr])
AC_CHECK_FUNCS([strdup])
AC_CHECK_FUNCS([strerror])
AC_CHECK_FUNCS([strrchr])
AC_CHECK_FUNCS([strcasecmp])
AC_FUNC_MALLOC

PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.10])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

useoss=yes

AC_ARG_ENABLE(
  oss,
  AC_HELP_STRING([--enable-oss], [use OSS @<:@default=yes@:>@]),
  [
    if test "x$enableval" = "xno"; then
      useoss=no
    fi
  ])

if test "x$useoss" = "xyes"; then
	AC_CHECK_HEADERS([fcntl.h])
	AC_CHECK_HEADERS([sys/ioctl.h])
	AC_SUBST(OSS_CFLAGS)
	AC_SUBST(OSS_LIBS)
	CFLAGS="$CFLAGS -DOSS"
fi


usealsa=yes

AC_ARG_ENABLE(
  alsa,
  AC_HELP_STRING([--enable-alsa], [use ALSA @<:@default=yes@:>@]),
  [
    if test "x$enableval" = "xno"; then
      usealsa=no
    fi
  ])

if test "x$usealsa" = "xyes"; then
	PKG_CHECK_MODULES([ALSA], [alsa])
	AC_SUBST(ALSA_CFLAGS)
	AC_SUBST(ALSA_LIBS)
	CFLAGS="$CFLAGS -DALSA"
fi

usejack=yes

AC_ARG_ENABLE(
  jack,
  AC_HELP_STRING([--enable-jack], [use JACK @<:@default=yes@:>@]),
  [
    if test "x$enableval" = "xno"; then
      usejack=no
    fi
  ])

AM_CONDITIONAL(HAVE_JACK, test "x$usejack" = "xyes")

if test "x$usejack" = "xyes"; then
	PKG_CHECK_MODULES(JACK, jack >= 0.117.0)
	AC_SUBST(JACK_CFLAGS)
	AC_SUBST(JACK_LIBS)
	CFLAGS="$CFLAGS -DJACK"
fi

usepulseaudio=yes

AC_ARG_ENABLE(
  pulseaudio,
  AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio @<:@default=yes@:>@]),
  [
    if test "x$enableval" = "xno"; then
      usepulseaudio=no
    fi
  ])

AM_CONDITIONAL(HAVE_PULSEAUDIO, test "x$usepulseaudio" = "xyes")

if test "x$usepulseaudio" = "xyes"; then
 	PKG_CHECK_MODULES(PULSEAUDIO, libpulse-simple >= 0.9.10)
	dnl	PKG_CHECK_MODULES(PULSEAUDIO, pulseaudio >= 0.9.10)
	AC_SUBST(PULSEAUDIO_CFLAGS)
	AC_SUBST(PULSEAUDIO_LIBS)
	CFLAGS="$CFLAGS -DPULSEAUDIO"
fi

uselibfftw=yes
fftw_found=no

AC_ARG_ENABLE(
  libfftw,
  AC_HELP_STRING([--enable-libfftw], [use libfftw @<:@default=yes@:>@]),
  [
    if test "x$enableval" = "xno"; then
      uselibfftw=no
    fi
  ])

dnl AM_CONDITIONAL(HAVE_LIBFFTW, test "x$uselibfftw" = "xyes")

if test "x$uselibfftw" = "xyes"; then
 PKG_CHECK_MODULES([LIBFFTW],
	 				[fftw3 >= 3.2.2
                    fftw3f >= 3.2.2],
                    [fftw_found=yes],
                    [fftw_found=no])
 if test "x$fftw_found" = xyes ; then
	AC_SUBST([LIBFFTW_CFLAGS])
	AC_SUBST([LIBFFTW_LIBS])
	CFLAGS="$CFLAGS -DLIBFFTW"
 else
  AC_MSG_WARN([ No libfftw was found : FFT will be slower ])
 fi
fi


dnl PKG_CHECK_MODULES([GLADE], [libglade-2.0])
dnl AC_SUBST(GLADE_CFLAGS)
dnl AC_SUBST(GLADE_LIBS)

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

dnl Set PACKAGE SOURCE DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`

dnl Set PACKAGE PREFIX
if test "x${prefix}" = "xNONE"; then
  packageprefix=${ac_default_prefix}
else
  packageprefix=${prefix}
fi

dnl Set PACKAGE DATA & DOC DIR
packagedatadir=share
packagedocdir=doc/${PACKAGE}

dnl Set PACKAGE DIRs in config.h.
packagepixmapsdir=share/pixmaps/${PACKAGE}
packageicondir=share/icons/hicolor/scalable/apps/
packagehelpdir=share/gnome/help/${PACKAGE}
packagemenudir=share/applications

dnl Subst PACKAGE_DATA_DIR.
NO_PREFIX_PACKAGE_DATA_DIR="${packagedatadir}"
AC_SUBST(NO_PREFIX_PACKAGE_DATA_DIR)
PACKAGE_DATA_DIR="${packageprefix}/${packagedatadir}"
AC_SUBST(PACKAGE_DATA_DIR)

dnl Subst PACKAGE_DOC_DIR.
NO_PREFIX_PACKAGE_DOC_DIR="${packagedocdir}"
AC_SUBST(NO_PREFIX_PACKAGE_DOC_DIR)
PACKAGE_DOC_DIR="${packageprefix}/${packagedocdir}"
AC_SUBST(PACKAGE_DOC_DIR)

dnl Subst PACKAGE_PIXMAPS_DIR.
NO_PREFIX_PACKAGE_PIXMAPS_DIR="${packagepixmapsdir}"
AC_SUBST(NO_PREFIX_PACKAGE_PIXMAPS_DIR)
PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}"
AC_SUBST(PACKAGE_PIXMAPS_DIR)

dnl Subst PACKAGE_ICON_DIR.
NO_PREFIX_PACKAGE_ICON_DIR="${packageicondir}"
AC_SUBST(NO_PREFIX_PACKAGE_ICON_DIR)
PACKAGE_ICON_DIR="${packageprefix}/${packageicondir}"
AC_SUBST(PACKAGE_ICON_DIR)

dnl Subst PACKAGE_HELP_DIR.
NO_PREFIX_PACKAGE_HELP_DIR="${packagehelpdir}"
AC_SUBST(NO_PREFIX_PACKAGE_HELP_DIR)
PACKAGE_HELP_DIR="${packageprefix}/${packagehelpdir}"
AC_SUBST(PACKAGE_HELP_DIR)

dnl Subst PACKAGE_MENU_DIR.
NO_PREFIX_PACKAGE_MENU_DIR="${packagemenudir}"
AC_SUBST(NO_PREFIX_PACKAGE_MENU_DIR)
PACKAGE_MENU_DIR="${packageprefix}/${packagemenudir}"
AC_SUBST(PACKAGE_MENU_DIR)

dnl AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${packageprefix}/${packagedatadir}")
dnl AC_DEFINE_UNQUOTED(PACKAGE_DOC_DIR, "${packageprefix}/${packagedocdir}")
dnl AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}")
dnl AC_DEFINE_UNQUOTED(PACKAGE_HELP_DIR, "${packageprefix}/${packagehelpdir}")
dnl AC_DEFINE_UNQUOTED(PACKAGE_MENU_DIR, "${packageprefix}/${packagemenudir}")
dnl AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")


AC_DEFINE([PACKAGE_DATA_DIR], [share], [Package data dir])
AC_DEFINE([PACKAGE_DOC_DIR], [doc], [Package doc dir])
AC_DEFINE([PACKAGE_HELP_DIR], [doc], [Help])
AC_DEFINE([PACKAGE_MENU_DIR], [], [Menu])
AC_DEFINE([PACKAGE_ICON_DIR], [icons], [Icons])
AC_DEFINE([PACKAGE_SRC_DIR], [src], [Source])


AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/Makefile
icons/Makefile
test/Makefile
org.nongnu.lingot.desktop
])
AC_OUTPUT