simple-mtpfs/configure.ac

68 lines
1.3 KiB
Plaintext
Raw Normal View History

2012-09-22 10:42:50 +00:00
AC_PREREQ([2.60])
2013-12-03 20:14:11 +00:00
AC_INIT([simple-mtpfs], [0.2], [phatina@gmail.com])
2012-09-22 10:42:50 +00:00
AC_CONFIG_MACRO_DIR([m4])
2013-12-03 20:14:11 +00:00
AM_INIT_AUTOMAKE([foreign dist-bzip2])
2012-09-22 10:42:50 +00:00
AC_CONFIG_HEADERS(config.h)
AM_SILENT_RULES([yes])
AC_LANG([C++])
AC_PROG_CXX
AC_PROG_INSTALL
m4_include([m4/cxx11.m4])
AX_CXX_COMPILE_STDCXX_11([noext])
AC_CHECK_LIB([mtp], [LIBMTP_Init], [], [AC_MSG_ERROR([libmtp not found])])
AC_CHECK_HEADERS([libmtp.h])
2013-11-23 12:19:34 +00:00
dnl Enable fdatasync, but not on OSX
test `uname -s` == "Darwin" || AC_CHECK_FUNCS([fdatasync])
2012-09-22 10:42:50 +00:00
PKG_CHECK_MODULES([FUSE], [fuse >= 2.7.3])
2012-09-22 10:42:50 +00:00
AC_SUBST([FUSE_CFLAGS])
AC_SUBST([FUSE_LIBS])
2013-09-17 19:43:36 +00:00
PKG_CHECK_MODULES(
[LIBUSB1],
[libusb-1.0 >= 1.0.0],
[AC_DEFINE([HAVE_LIBUSB1], [], [Have libusb 1.0])]
)
AC_SUBST([LIBUSB1_CFLAGS])
AC_SUBST([LIBUSB1_LIBS])
2013-11-18 19:11:10 +00:00
dnl Configurable temporary directory
AC_ARG_WITH(
[tmpdir],
[AS_HELP_STRING([--with-tmpdir@<:=DIR@:>@],
[Directory for temporary files, defaults to /tmp])],
[], []
)
AS_IF(
[test "x$withval" != "x"],
[tmpdir="$withval"],
[tmpdir="/tmp"]
)
AC_DEFINE_UNQUOTED(
[TMPDIR],
["${tmpdir}"],
[Directory for temporary files]
)
2012-09-22 10:42:50 +00:00
AC_OUTPUT([
makefile
src/makefile
man/makefile
])
2013-11-18 19:12:26 +00:00
AC_MSG_NOTICE([
simple-mtpfs $VERSION
================
prefix: ${prefix}
tmpdir: ${tmpdir}
Now type 'make' to build $PACKAGE
])