summaryrefslogtreecommitdiffstats
path: root/configure.in
blob: 1efbecc76cace0a8b7314736a4b7929ee5b8b44f (plain)
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================

dnl    This file is part of the KDE libraries/packages
dnl    Copyright (C) 2001 Stephan Kulow ([email protected])
 
dnl    This file is free software; you can redistribute it and/or
dnl    modify it under the terms of the GNU Library General Public
dnl    License as published by the Free Software Foundation; either
dnl    version 2 of the License, or (at your option) any later version.
 
dnl    This library is distributed in the hope that it will be useful,
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl    Library General Public License for more details.
 
dnl    You should have received a copy of the GNU Library General Public License
dnl    along with this library; see the file COPYING.LIB.  If not, write to
dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
dnl    Boston, MA 02110-1301, USA.

# Original Author was [email protected]
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas

dnl Process this file with autoconf to produce a configure script.

AC_INIT(acinclude.m4) dnl a source file from your sub dir

dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)

dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH

dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM 
dnl Perform program name transformation
AC_ARG_PROGRAM

dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(tderadio-0.1.1.1~20061112, "3.5.5") dnl searches for some needed programs

KDE_SET_PREFIX

dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL

dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS

KDE_USE_TQT(3.3)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================

#MIN_CONFIG(3.3)
# Define a symbol, to know that we're compiling WITH kde. (for apps that
#  can compile without KDE, optionally)
AM_CONDITIONAL(KDE_INSTALLED, test "$have_kde" = "yes")

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/stat.h stdint.h)
AC_CHECK_HEADERS(sys/cdefs.h fnmatch.h sysent.h strings.h paths.h)
AC_CHECK_HEADERS(utmp.h sys/param.h linux/tcp.h sys/proc.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME

AC_C_LONG_DOUBLE  

dnl Checks for library functions.
KDE_CHECK_DLOPEN
AC_CHECK_FUNCS(socket fabsl strdup vsnprintf re_comp flock) 
AC_CHECK_SETENV
AC_CHECK_UNSETENV
AC_CHECK_GETDOMAINNAME
AC_CHECK_GETHOSTNAME 
AM_PROG_LEX
LFLAGS="-o${LEX_OUTPUT_ROOT}.c"
AC_SUBST(LFLAGS)
dnl =======================================================
dnl FILE: ./tderadio3/configure.in.in
dnl =======================================================

#MIN_CONFIG(3.2)


CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

dnl --------------------------------------------------------------------
dnl Check for LIRC client support

PLUGIN_LIRC=
LIB_LIRC=

AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [enable use of LIRC if found, default = true]))
if test -z "$enable_lirc" -o "$enable_lirc" = "yes"; then

	have_lirc=yes
	KDE_CHECK_LIB(lirc_client,lirc_init,,have_lirc=no)
	if test "$have_lirc" = "yes"; then
		KDE_CHECK_HEADER(lirc/lirc_client.h,,have_lirc=no)
	fi

	AC_MSG_CHECKING([for lirc support])

	if test "$have_lirc" = "yes"; then
		AC_DEFINE(HAVE_LIRC, 1, [Define this if lirc client library is available and should be used])
	  	LIB_LIRC="-llirc_client"
		PLUGIN_LIRC=lirc
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi


else

	AC_MSG_CHECKING([for lirc support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_LIRC)
AC_SUBST(PLUGIN_LIRC)


dnl ---------------------------------------------------------------------
dnl V4L2


AC_ARG_ENABLE(v4l2, AC_HELP_STRING([--enable-v4l2], [enable use of V4L2 if found, default = true]))
if test -z "$enable_v4l2" -o "$enable_v4l2" = "yes"; then

	AC_MSG_CHECKING([for v4l2 support])
	AC_DEFINE_UNQUOTED(HAVE_V4L2, 1, [Define if you have V4L2 support])
	AC_MSG_RESULT([v4l2 support enabled])

else

	AC_MSG_CHECKING([for v4l2 support])
	AC_MSG_RESULT([disabled])

fi

dnl ---------------------------------------------------------------------
dnl LibSndFile

AC_CHECK_LIB(sndfile, sf_open, [], AC_MSG_ERROR([libsndfile not found]))
AC_CHECK_HEADERS([sndfile.h], [], AC_MSG_ERROR([libsndfile header not found]))
AC_CHECK_HEADERS([sys/soundcard.h], [], AC_MSG_ERROR([sys/soundcard.h not found]))

dnl ---------------------------------------------------------------------
dnl LibLame

LIB_LAME=

AC_ARG_ENABLE(lame, AC_HELP_STRING([--enable-lame], [enable use of lame if found, default = true]))
if test -z "$enable_lame" -o "$enable_lame" = "yes"; then


	have_lame=yes
	KDE_CHECK_LIB(mp3lame,lame_init,,have_lame=no)
	if test "$have_lame" = "yes"; then
		KDE_CHECK_HEADER(lame/lame.h,,have_lame=no)
	fi

	AC_MSG_CHECKING([for lame support])

	if test "$have_lame" = "yes"; then
		AC_DEFINE(HAVE_LAME, 1, [Define this if lame mp3 encoder library is available and should be used])
	  	LIB_LAME="-lmp3lame"
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi

else

	AC_MSG_CHECKING([for lame support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_LAME)


dnl ---------------------------------------------------------------------
dnl Ogg/Vorbis support

LIB_OGG=

AC_ARG_ENABLE(ogg, AC_HELP_STRING([--enable-ogg], [enable use of Ogg/Vorbis if found, default = true]))
if test -z "$enable_ogg" -o "$enable_ogg" = "yes"; then


	have_ogg=yes
	KDE_CHECK_LIB(vorbisenc,vorbis_encode_init,,have_ogg=no)
	if test "$have_ogg" = "yes"; then
		KDE_CHECK_HEADER(vorbis/vorbisenc.h,,have_ogg=no)
	fi
	if test "$have_ogg" = "yes"; then
		KDE_CHECK_LIB(ogg,ogg_stream_packetin,,have_ogg=no)
	fi
	if test "$have_ogg" = "yes"; then
		KDE_CHECK_HEADER(ogg/ogg.h,,have_ogg=no)
	fi

	AC_MSG_CHECKING([for ogg/vorbis support])

	if test "$have_ogg" = "yes"; then
		AC_DEFINE(HAVE_OGG, 1, [Define this if OGG/Vorbis encoder library is available and should be used])
		LIB_OGG="-logg -lvorbisenc"
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi

else

	AC_MSG_CHECKING([for ogg/vorbis support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_OGG)

dnl ---------------------------------------------------------------------
dnl ALSA support

LIB_ALSA=
PLUGIN_ALSA=

AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], [enable use of ALSA if found, default = true]))
if test -z "$enable_alsa" -o "$enable_alsa" = "yes"; then


	have_alsa=yes
	KDE_CHECK_LIB(asound,snd_card_next,,have_alsa=no)
	if test "$have_alsa" = "yes"; then
		KDE_CHECK_HEADER(alsa/asoundlib.h,,have_alsa=no)
	fi

	AC_MSG_CHECKING([for ALSA support])

	if test "$have_alsa" = "yes"; then
		AC_DEFINE(HAVE_ALSA, 1, [Define this if ALSA library is available and should be used])
		LIB_ALSA="-lasound"
		PLUGIN_ALSA=alsa-sound
		AC_MSG_RESULT([enabled])
	else
		AC_MSG_RESULT([disabled])
	fi

else

	AC_MSG_CHECKING([for alsa support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(LIB_ALSA)
AC_SUBST(PLUGIN_ALSA)


dnl ---------------------------------------------------------------------
dnl OSS Plugin

PLUGIN_OSS=

AC_ARG_ENABLE(oss, AC_HELP_STRING([--enable-oss], [compile OSS plugin, default = true]))
if test -z "$enable_oss" -o "$enable_oss" = "yes"; then

	PLUGIN_OSS=oss-sound
	AC_MSG_CHECKING([for OSS support])
	AC_MSG_RESULT([enabled])
else

	AC_MSG_CHECKING([for OSS support])
	AC_MSG_RESULT([disabled])

fi

AC_SUBST(PLUGIN_OSS)


dnl ---------------------------------------------------------------------------

AC_SUBST(libtderadiodir, '$(libdir)/tderadio/plugins')


dnl ----------------------------------------------------------------------
dnl apidox
KDE_INIT_DOXYGEN([The TDERadio API Reference], [Version $VERSION])
KDE_CREATE_SUBDIRSLIST
AM_CONDITIONAL(tderadio3_SUBDIR_included, test "x$tderadio3_SUBDIR_included" = xyes)
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ tderadio3/Makefile ])
AC_CONFIG_FILES([ tderadio3/convert-presets/Makefile ])
AC_CONFIG_FILES([ tderadio3/convert-presets/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/alsa-sound/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/alsa-sound/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/alsa-sound/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-docking-menu/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-docking-menu/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-error-log/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-error-log/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-quickbar/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-quickbar/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-standard-display/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/gui-standard-display/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/lirc/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/lirc/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/oss-sound/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/oss-sound/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/oss-sound/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/radio/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/radio/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/recording/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/recording/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/recording/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/soundserver/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/soundserver/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/streaming/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/streaming/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/streaming/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/timecontrol/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/timecontrol/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/timecontrol/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/timeshifter/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/timeshifter/icons/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/timeshifter/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/v4lradio/Makefile ])
AC_CONFIG_FILES([ tderadio3/plugins/v4lradio/po/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/argentina/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/australia/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/austria/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/belgium/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/brazil/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/bulgaria/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/canada/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/catalonia/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/czechia/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/england/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/england/buckinghamshire/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/finland/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/france/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/germany/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/hungary/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/iceland/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/ireland/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/italy/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/lithuania/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/luxemburg/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/netherlands/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/new-zealand/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/norway/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/poland/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/portugal/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/romania/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/russia/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/slovakia/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/south-africa/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/spain/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/sweden/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/switzerland/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/turkey/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/uruguay/Makefile ])
AC_CONFIG_FILES([ tderadio3/presets/usa/Makefile ])
AC_CONFIG_FILES([ tderadio3/src/Makefile ])
AC_CONFIG_FILES([ tderadio3/src/po/Makefile ])
AC_OUTPUT
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
  # And if so, warn when they don't match
  if test "$kde_libs_prefix" != "$given_prefix"; then
    # And if kde doesn't know about the prefix yet
    echo ":"`tde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
    if test $? -ne 0; then
      echo ""
      echo "Warning: you chose to install this package in $given_prefix,"
      echo "but KDE was found in $kde_libs_prefix."
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
      echo "that TDEDIRS contains it, e.g. export TDEDIRS=$given_prefix:$kde_libs_prefix"
      echo "Then restart KDE."
      echo ""
    fi
  fi
fi

if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
  echo ""
  echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
  echo "was not included. Therefore, GCC symbol visibility support remains disabled."
  echo ""
  echo "For better performance, consider including the Qt visibility supporting patch"
  echo "located at:"
  echo ""
  echo "http://bugs.kde.org/show_bug.cgi?id=109386"
  echo ""
  echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
  echo "everything will continue to work just fine without it."
  echo ""
fi

if test "$all_tests" = "bad"; then
  if test ! "$cache_file" = "/dev/null"; then
    echo ""
    echo "Please remove the file $cache_file after changing your setup"
    echo "so that configure will find the changes next time."
    echo ""
  fi
else
  echo ""
  echo "Good - your configure finished. Start make now"
  echo ""
fi