1
dnl Process this file with autoconf to produce a configure script.
2
dnl $Id: configure.in 4211 2010-12-16 21:36:13Z pak21 $
4
dnl This program is free software; you can redistribute it and/or modify
5
dnl it under the terms of the GNU General Public License as published by
6
dnl the Free Software Foundation; either version 2 of the License, or
7
dnl (at your option) any later version.
9
dnl This program is distributed in the hope that it will be useful,
10
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
dnl GNU General Public License for more details.
14
dnl You should have received a copy of the GNU General Public License along
15
dnl with this program; if not, write to the Free Software Foundation, Inc.,
16
dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
dnl Author contact information:
20
dnl E-mail: philip-fuse@shadowmagic.org.uk
23
AM_CONFIG_HEADER(config.h)
25
dnl Use automake to produce `Makefile.in'
26
AM_INIT_AUTOMAKE(fuse-utils, [1.0.0])
28
dnl Checks for programs.
33
dnl Check for big endianness
36
dnl Check for header files
37
AC_CHECK_HEADERS(strings.h)
39
dnl Allow the user to say that various libraries are in one place
40
AC_ARG_WITH(local-prefix,
41
[ --with-local-prefix=PFX local libraries installed in PFX (optional)],
42
CFLAGS="$CFLAGS -I$withval/include";
43
CXXFLAGS="$CXXFLAGS -I$withval/include";
44
LDFLAGS="$LDFLAGS -L$withval/lib",
45
if test "$prefix" != "NONE"; then
46
CFLAGS="$CFLAGS -I$prefix/include";
47
CXXFLAGS="$CXXFLAGS -I$prefix/include";
48
LDFLAGS="$LDFLAGS -L$prefix/lib"
51
dnl Check that libgcrypt is available
52
AC_CHECK_LIB(gcrypt,gcry_check_version,
53
AC_DEFINE([HAVE_LIBGCRYPT], 1, [Defined if we've got libgcrypt])
54
GCRYPT_LIBS="$LIBS -lgcrypt"
58
AM_CONDITIONAL(BUILD_RZXCHECK, test "$gcrypt" = yes)
60
dnl Do we want lots of warning messages?
61
AC_MSG_CHECKING(whether lots of warnings requested)
62
AC_ARG_ENABLE(warnings,
63
[ --enable-warnings give lots of warnings if using gcc],
64
if test "$enableval" = yes; then
70
AC_MSG_RESULT($warnings)
72
dnl If it appears we're using gcc as our compiler, turn on warnings
73
if test "$ac_cv_prog_gcc" = yes; then
74
CFLAGS="$CFLAGS -Wall"
75
CXXFLAGS="$CXXFLAGS -Wall"
76
dnl And possibly lots of warnings
77
if test "$warnings" = yes; then
78
CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -W -Wsign-compare"
82
# Must either find glib or use the replacement (as supplied by libspectrum)
83
AC_MSG_CHECKING(whether to use glib)
85
[ --without-glib don't use glib],
86
if test "$withval" = no; then glib=no; else glib=yes; fi,
89
if test "$glib" = yes; then
94
AC_DEFINE([HAVE_LIB_GLIB], 1, [Defined if we've got glib])
95
GLIBS="`pkg-config --libs glib-2.0`",
97
if test "$glib2" = no; then
100
AC_DEFINE([HAVE_LIB_GLIB], 1, [Defined if we've got glib])
101
GLIBS="`glib-config --libs`",
102
AC_MSG_WARN(glib not found - using libspectrum's replacement)
107
dnl Check that libspectrum is available
108
AC_ARG_WITH(libspectrum-prefix,
109
[ --with-libspectrum-prefix=PFX where libspectrum is installed (optional)],
110
LIBSPEC_CFLAGS=-I$withval/include; LIBSPEC_LIBS=-L$withval/lib,
111
LIBSPEC_CFLAGS=""; LIBSPEC_LIBS="")
112
ac_save_CPPFLAGS="$CPPFLAGS"
113
CPPFLAGS="$CFLAGS $LIBSPEC_CFLAGS $GLIB_CFLAGS"
114
AC_CHECK_HEADERS(libspectrum.h,LIBSPEC_LIBS="$LIBSPEC_LIBS -lspectrum $GLIBS",
115
AC_MSG_ERROR(Sorry - I need libspectrum to be available))
116
CPPFLAGS="$ac_save_CPPFLAGS"
117
AC_SUBST(LIBSPEC_CFLAGS)
118
AC_SUBST(LIBSPEC_LIBS)
120
# Look for audiofile (default=yes)
121
AC_MSG_CHECKING(whether to use audiofile)
122
AC_ARG_WITH(audiofile,
123
[ --without-audiofile don't use audiofile],
124
if test "$withval" = no; then audiofile=no; else audiofile=yes; fi,
126
AC_MSG_RESULT($audiofile)
127
if test "$audiofile" = yes; then
131
AC_DEFINE([HAVE_LIB_AUDIOFILE], 1, [Defined if we've got audiofile]), []
133
if test -z "$AUDIOFILE_LIBS"; then
136
AC_DEFINE([HAVE_LIB_AUDIOFILE], 1, [Defined if we've got audiofile])
140
AM_CONDITIONAL(BUILD_AUDIOTOOLS, test "$audiofile" = yes)
142
# Look for iconv (default=yes)
143
AC_MSG_CHECKING(whether to use iconv)
145
[ --without-iconv don't use iconv],
146
if test "$withval" = no; then iconv=no; else iconv=yes; fi,
148
AC_MSG_RESULT($iconv)
149
if test "$iconv" = yes; then
150
AC_CHECK_HEADERS(locale.h)
151
AC_CHECK_FUNCS(setlocale)
156
dnl Work out which compatibility routines to use
157
AC_MSG_CHECKING(which compatibility routines to use)
160
COMPAT_OSNAME='amiga'
166
AC_MSG_RESULT($COMPAT_OSNAME)
167
COMPAT_SUBDIR="compat/$COMPAT_OSNAME"
168
AC_SUBST(COMPAT_SUBDIR)
169
AC_SUBST(COMPAT_OSNAME)
172
compat/amiga/Makefile \
173
compat/unix/Makefile \