1# Process this file with autoconf to produce a configure script 2 3AC_INIT([archivemount],[0.8.12], [andrel@cybernoia.de]) 4AM_INIT_AUTOMAKE([-Wall -Werror foreign]) 5AC_PROG_CC 6 7AC_CONFIG_HEADERS([config.h]) 8AC_CONFIG_FILES([Makefile archivemount.1]) 9 10 11RELEASE_DATE="27 March 2019" 12AC_SUBST(RELEASE_DATE) 13 14CFLAGS= 15 16# Check for libfuse 17PKG_CHECK_EXISTS(fuse) 18PKG_CHECK_MODULES([FUSE], [fuse >= 2.6],, 19 AC_MSG_ERROR([libfuse>=2.6 not found. 20 21 If libfuse is installed then perhaps you should set 22 the PKG_CONFIG_PATH=/dir/containing/fuse.pc environment 23 variable])) 24AC_SUBST([FUSE_LIBS]) 25AC_SUBST([FUSE_CFLAGS]) 26 27 28# Check for libarchive (no pkg-config support) 29AC_CHECK_LIB([archive], [archive_read_new], [ARCHIVE_LIBS=-larchive], 30 AC_MSG_ERROR([libarchive not found. 31 If libarchive is installed then perhaps you should set 32 the LDFLAGS=-L/nonstandard/lib/dir environment variable])) 33AC_SUBST([ARCHIVE_LIBS]) 34AC_CHECK_HEADERS([archive.h archive_entry.h],, 35 AC_MSG_ERROR([libarchive headers not found. 36 37 If the libarchive headers are installed then perhaps you 38 should set the CPPFLAGS=-I/nonstandard/include/dir 39 environment variable])) 40 41AC_CHECK_HEADERS([regex.h],, 42 AC_MSG_ERROR([regex.h not found. 43 44 If the regex.h header file is installed then perhaps you 45 should set the CPPFLAGS=-I/nonstandard/include/dir 46 environment variable])) 47 48 49# Debug support 50AC_MSG_CHECKING(if you want debug support) 51debug_on=no 52AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], 53 [enable debug support (def=no)]), 54 debug_on="$enableval") 55AC_MSG_RESULT($debug_on) 56if test "$debug_on" = "no"; then 57 AC_DEFINE([NDEBUG],, [Define to drop debug support]) 58fi 59AM_CONDITIONAL(DEBUG, test "$debug_on" = yes) 60 61AC_OUTPUT 62 63