1# configure.ac for mp3c, WSPse 08 Mar 2006
2AC_PREREQ(2.59)
3AC_INIT([MP3C], [0.31], [http://mp3c.wspse.de/])
4AC_CONFIG_HEADERS([config.h])
5AC_LANG([C])
6
7AM_INIT_AUTOMAKE
8AM_GNU_GETTEXT([external])
9AM_GNU_GETTEXT_VERSION
10AM_ICONV
11
12AC_PROG_CC
13AC_ISC_POSIX
14AC_PROG_INSTALL
15AC_PROG_MAKE_SET
16
17ALL_LINGUAS="de es it pl pt"
18
19AC_HEADER_STDC
20AC_CHECK_HEADERS(fcntl.h strings.h sys/ioctl.h sys/time.h unistd.h \
21		 linux/cdrom.h sys/cdio.h signal.h string.h ctype.h \
22		 time.h dirent.h sys/stat.h sys/types.h sys/wait.h \
23		 errno.h libintl.h locale.h)
24AC_CHECK_LIB(ncurses, main)
25
26cddbpath=/opt/kde/share/apps/kscd/cddb
27AC_MSG_CHECKING([where to store CDDB-entries])
28AC_ARG_WITH([cddb-path], [  --with-cddb-path=<path> to set cddb-path],
29[
30  cddbpath=${withval}
31],[
32  if ! test -d "$cddbpath"; then
33    cddbpath=$KDEDIR/share/apps/kscd/cddb
34  fi
35  if ! test -d "$cddbpath"; then
36    cddbpath=/usr/X11R6/lib/X11/xmcd/cddb
37  fi
38  if ! test -d "$cddbpath"; then
39    cddbpath=/usr/local/X11R6/lib/X11/xmcd/cddb
40  fi
41  if ! test -d "$cddbpath"; then
42    cddbpath=/usr/lib/xmcd/cddb
43  fi
44  if ! test -d "$cddbpath"; then
45    cddbpath=/usr/local/lib/xmcd/cddb
46  fi
47  if ! test -d "$cddbpath"; then
48    cddbpath=/usr/share/xmcd/cddb
49  fi
50  if ! test -d "$cddbpath"; then
51    cddbpath=/usr/local/share/xmcd/cddb
52  fi
53
54  if ! test -d "$cddbpath"; then
55    cddbpath="~/.cddb"
56  fi
57])
58AC_MSG_RESULT($cddbpath)
59AC_DEFINE_UNQUOTED([CONF_CDDB_PATH], "${cddbpath}", [where should we store CDDB-entries])
60
61AC_MSG_CHECKING([whether to use OGG as default])
62AC_ARG_ENABLE([oggdefaults], [  --enable-oggdefaults    use OGG parameters as default],
63[
64	if test "$enableval" = "yes"; then
65		AC_DEFINE([OGG_AS_DEFAULT],1,[whether to use OGG as default])
66		AC_MSG_RESULT(yes)
67	else
68		AC_MSG_RESULT(no)
69	fi
70],[
71	AC_MSG_RESULT(no)
72])
73
74CFLAGS="$CFLAGS -Wall"
75
76AC_OUTPUT(doc/Makefile doc/mp3c.1 patches/Makefile m4/Makefile \
77	  po/Makefile.in src/Makefile src/mp3creat.h Makefile)
78
79