Code

883904b97f37ab8f08daa650238236858b042378
[fusedav.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 # $Id$
6 # This file is part of fusedav.
7 #
8 # fusedav is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # fusedav is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with fusedav; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
22 AC_PREREQ(2.59)
23 AC_INIT([fusedav],[0.1],[mzshfrqni (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([src/fusedav.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign -Wall])
27 AC_REVISION($Id$)
29 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/fusedav/])
31 if type -p stow > /dev/null && test -d /usr/local/stow ; then
32    AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
33    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
34 fi
36 # Checks for programs.
37 AC_PROG_CXX
38 AC_PROG_CC
39 AC_PROG_CPP
40 AC_PROG_INSTALL
41 AC_PROG_LN_S
42 AC_PROG_MAKE_SET
44 # If using GCC specifiy some additional parameters
45 if test "x$GCC" = "xyes" ; then
46    CFLAGS="$CFLAGS -pipe -Wall -ansi"
47 fi
49 # 64 Bit LFS support
50 AC_SYS_LARGEFILE
52 # Checks for header files.
53 AC_HEADER_STDC
54 AC_HEADER_SYS_WAIT
55 AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/time.h syslog.h unistd.h])
57 # Checks for typedefs, structures, and compiler characteristics.
58 AC_C_CONST
59 AC_TYPE_PID_T
60 AC_HEADER_TIME
61 AC_C_VOLATILE
63 # Checks for library functions.
64 AC_FUNC_FORK
65 AC_PROG_GCC_TRADITIONAL
66 AC_FUNC_SELECT_ARGTYPES
67 AC_FUNC_MALLOC
68 AC_TYPE_SIGNAL
69 AC_FUNC_VPRINTF
70 AC_CHECK_FUNCS([alarm dup2 memset select setenv socket strchr strdup strerror strrchr strspn])
72 NEON_REQUIRE(0,24)
73 NEON_LIBRARY
74 NEON_WARNINGS
76 # FUSE
77 AC_CHECK_HEADER(fuse.h,, [AC_MSG_ERROR([ *** fuse.h not found *** ])])
78 AC_CHECK_LIB(fuse,fuse_main, [FUSE_LIBS="-lfuse"], [AC_MSG_ERROR([ *** libfuse.a not found *** ])], -lpthread)
80 AC_SUBST(FUSE_LIBS)
82 # LYNX documentation generation
83 AC_ARG_ENABLE(lynx,
84         AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
85 [case "${enableval}" in
86   yes) lynx=yes ;;
87   no)  lynx=no ;;
88   *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
89 esac],[lynx=yes])
91 if test x$lynx = xyes ; then
92    AC_CHECK_PROG(have_lynx, lynx, yes, no)
94    if test x$have_lynx = xno ; then
95      AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
96    fi
97 fi
99 AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
101 AC_CONFIG_FILES([src/Makefile Makefile doc/Makefile doc/README.html])
102 AC_OUTPUT