[go: up one dir, main page]

File: configure.in

package info (click to toggle)
fusesmb 0.8.7-1.3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 592 kB
  • ctags: 254
  • sloc: sh: 3,185; ansic: 2,912; makefile: 67
file content (98 lines) | stat: -rw-r--r-- 3,181 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
dnl Process this file with autoconf to produce a configure script.

AC_INIT(fusesmb.c)
dnl Every other copy of the package version number gets its value from here
AM_INIT_AUTOMAKE(fusesmb, 0.8.7)

dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
AM_CONFIG_HEADER(config.h)

AC_SUBST(VERSION)
AC_DEFINE(_FILE_OFFSET_BITS,64,[Use 64 bits file offsets])
AC_DEFINE(FUSE_USE_VERSION,22,[Fuse API Version])


# $prefix stores the value of the --prefix command line option, or
# NONE if the option wasn't set.  In the case that it wasn't set, make
# it be the default, so that we can use it to expand directories now.
if test "x$prefix" = "xNONE"; then
  prefix=$ac_default_prefix
fi

# and similarly for $exec_prefix
if test "x$exec_prefix" = "xNONE"; then
  exec_prefix=$prefix
fi


dnl FUSESMB_CACHE_BINDIR=`eval echo $bindir`
dnl AC_SUBST(FUSESMB_CACHE_BINDIR)
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
AC_MSG_NOTICE(Storing data files in $SYSCONFDIR)
AS_AC_EXPAND(BINDIR, $bindir)
AC_DEFINE_UNQUOTED(FUSESMB_SYSCONFDIR, $SYSCONFDIR, [System configuration path])
AC_DEFINE_UNQUOTED(FUSESMB_CACHE_BINDIR, "$BINDIR", [Path to fusesmb.cache])
dnl AC_DEFINE([FUSESMB_CACHE_BINDIR], [], [Path to fusesmb.cache])

AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],
                                  [Turn debugging options on]),
            [])

if [[ "x$enable_debug" = "xyes" ]]; then
  CFLAGS="$CFLAGS -Wall -W -g "
else
  CFLAGS="$CFLAGS -Wall -W -g -O2"
fi

ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)

AC_CANONICAL_HOST

dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AC_CHECK_PROG(NMBLOOKUP,nmblookup,yes,no)
test $NMBLOOKUP = no && AC_MSG_ERROR([Please install nmblookup.])

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdio.h  string.h  stdlib.h  stddef.h  errno.h  fcntl.h  dirent.h  sys/param.h  sys/vfs.h pthread.h )
AC_CHECK_HEADERS(fuse.h,, AC_MSG_ERROR([Please install fuse header files.]))
AC_CHECK_HEADERS(libsmbclient.h,, AC_MSG_ERROR([Please install libsmbclient header files.]))
AC_CACHE_CHECK([whether libsmbclient has close or close_fn],
               [ac_cv_libsmbclient_has_close_fn],
               [AC_TRY_COMPILE([
#include <libsmbclient.h>
               ],[
SMBCCTX *ctx;
SMBCFILE *file;
ctx->close_fn(ctx, file);
               ],
               ac_cv_libsmbclient_has_close_fn=yes,
               ac_cv_libsmbclient_has_close_fn=no)])

if test $ac_cv_libsmbclient_has_close_fn = yes; then
  AC_DEFINE(HAVE_LIBSMBCLIENT_CLOSE_FN, [], 
            [New close function for libsmbclient >= 3.0.20])
fi

#jm_CHECK_TYPE_STRUCT_UTIMBUF
#AC_HEADER_MAJOR
#AC_FUNC_ALLOCA
#AC_STRUCT_TM
AC_STRUCT_ST_BLOCKS
#AC_FUNC_CLOSEDIR_VOID
#AC_CHECK_FUNCS(mkfifo)
#AC_CHECK_FUNC(mknod)

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.
AC_CHECK_LIB(smbclient, smbc_new_context,, AC_MSG_ERROR([Please install libsmbclient >= 3.0.1 first.]))
AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR([Please install pthreads library first.]))
AC_CHECK_LIB(fuse, fuse_main,, AC_MSG_ERROR([Please install libfuse >= 1.1 first.]))

AC_OUTPUT(Makefile fusesmb.lsm fusesmb.spec)