2 # Process this file with autoconf to produce a configure script.
6 # This file is part of fusedav.
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.
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.
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.
23 AC_INIT([fusedav],[0.2],[mzshfrqni (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([src/fusedav.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign -Wall])
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}"
38 # Checks for programs.
46 AC_LANG_CONFTEST([int main() {}])
47 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
53 # If using GCC specify some additional parameters
54 if test "x$GCC" = "xyes" ; then
56 DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline"
58 if test "x$HAVE_NETLINK" = "xyes" ; then
59 # Test whether rtnetlink.h can be included when compiled with -std=c99
60 # some distributions (e.g. archlinux) have broken headers that dont
61 # define __u64 with -std=c99
62 AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99])
65 AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
66 use_stdc99=yes, use_stdc99=no)
68 if test x"$use_stdc99" = xyes; then
69 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
77 DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
80 for flag in $DESIRED_FLAGS ; do
81 AC_MSG_CHECKING([whether $CC accepts $flag])
82 if test_gcc_flag $flag ; then
83 CFLAGS="$CFLAGS $flag"
94 # Checks for header files.
97 AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdlib.h string.h sys/statfs.h termios.h unistd.h])
99 # Checks for typedefs, structures, and compiler characteristics.
106 # Checks for library functions.
108 AC_CHECK_FUNCS([ftruncate memset strdup strerror strrchr])
110 AC_CHECK_LIB([pthread], [pthread_create])
112 PKG_CHECK_MODULES(NEON, [ neon >= 0.25 ])
113 PKG_CHECK_MODULES(FUSE, [ fuse >= 2.5 ])
115 # LYNX documentation generation
117 AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
118 [case "${enableval}" in
121 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
124 if test x$lynx = xyes ; then
125 AC_CHECK_PROG(have_lynx, lynx, yes, no)
127 if test x$have_lynx = xno ; then
128 AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
132 AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
134 AC_CONFIG_FILES([src/Makefile Makefile doc/Makefile doc/README.html])