Code

adjust svn
[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_CC
38 AC_PROG_CPP
39 AC_PROG_INSTALL
40 AC_PROG_LN_S
41 AC_PROG_MAKE_SET
43 # If using GCC specifiy some additional parameters
44 if test "x$GCC" = "xyes" ; then
45    CFLAGS="$CFLAGS -pipe -Wall -ansi"
46 fi
48 # 64 Bit LFS support
49 AC_SYS_LARGEFILE
51 # Checks for header files.
52 AC_HEADER_DIRENT
53 AC_HEADER_STDC
54 AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdlib.h string.h sys/statfs.h termios.h unistd.h])
56 # Checks for typedefs, structures, and compiler characteristics.
57 AC_C_CONST
58 AC_TYPE_MODE_T
59 AC_TYPE_OFF_T
60 AC_TYPE_SIZE_T
61 AC_STRUCT_ST_BLOCKS
63 # Checks for library functions.
64 AC_FUNC_MALLOC
65 AC_CHECK_FUNCS([ftruncate memset strdup strerror strrchr])
67 AC_CHECK_LIB([pthread], [pthread_create])
69 NEON_REQUIRE(0,24)
70 NEON_LIBRARY
71 NEON_WARNINGS
73 # FUSE
74 AC_CHECK_HEADER(fuse.h,, [AC_MSG_ERROR([ *** fuse.h not found *** ])])
75 AC_CHECK_LIB(fuse,fuse_main, [FUSE_LIBS="-lfuse"], [AC_MSG_ERROR([ *** libfuse.a not found *** ])], -lpthread)
76 AC_SUBST(FUSE_LIBS)
78 # LYNX documentation generation
79 AC_ARG_ENABLE(lynx,
80         AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
81 [case "${enableval}" in
82   yes) lynx=yes ;;
83   no)  lynx=no ;;
84   *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
85 esac],[lynx=yes])
87 if test x$lynx = xyes ; then
88    AC_CHECK_PROG(have_lynx, lynx, yes, no)
90    if test x$have_lynx = xno ; then
91      AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
92    fi
93 fi
95 AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
97 AC_CONFIG_FILES([src/Makefile Makefile doc/Makefile doc/README.html])
98 AC_OUTPUT