1
# @@LICENSE@@
2
#
3
#
4
AC_INIT([nota-fs],[3.0-unlicensed],[http://])
5
# AC_CONFIG_HEADERS([config.h])
6
7
AC_CONFIG_SRCDIR(src/fs.c)
8
AM_INIT_AUTOMAKE(fs,1.0)
9
10
if test x$prefix = xNONE; then
11
   prefix=/usr/local
12
fi
13
AC_SUBST(prefix)
14
15
AC_PROG_CC
16
AM_PROG_CC_STDC
17
AC_HEADER_STDC
18
AC_PROG_LIBTOOL
19
20
# require pkg-config
21
AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no]) 
22
if test "x$PKG_CONFIG" = "xno"; then
23
   AC_MSG_ERROR([
24
   *** The pkg-config script could not be found. Make sure it is
25
   *** in your path, or set the PKG_CONFIG environment variable
26
   *** to the full path to pkg-config.]) 
27
fi
28
29
PKG_CHECK_MODULES(NOTA_H_IN,nota-h_in-3.0)
30
AC_SUBST(NOTA_H_IN_LIBS)
31
AC_SUBST(NOTA_H_IN_CFLAGS)
32
33
PKG_CHECK_MODULES(NOTA_H_IN_SP,nota-h_in-sp-3.0)
34
AC_SUBST(NOTA_H_IN_SP_LIBS)
35
AC_SUBST(NOTA_H_IN_SP_CFLAGS)
36
37
PKG_CHECK_MODULES(NOTA_STUBGEN,nota-stubgen-3.0)
38
AC_SUBST(NOTA_STUBGEN_LIBS)
39
AC_SUBST(NOTA_STUBGEN_CFLAGS)
40
41
# security? 
42
AC_ARG_ENABLE(secure_registration,
43
	[AC_HELP_STRING([--enable-secure-registration],
44
	[enable extra security for service registration/unregistration (yes,no)])],
45
[case "${enableval}" in
46
      yes) sec_reg=true;;
47
      *)   sec_reg=false ;;
48
esac],[sec_reg=false])   
49
			
50
if test "x$sec_reg" == "xtrue"; then
51
   echo "laal"
52
   AC_DEFINE_UNQUOTED(NOTA_HAVE_SECURE_REGISTRATION,1, 
53
   [whether we have secure registration/deregistration])
54
fi
55
56
#prints?
57
AC_ARG_ENABLE(prints,
58
	[AC_HELP_STRING([--enable-prints],
59
	[enables printing prints (yes,no)])],
60
[case "${enableval}" in
61
      yes) prints=true;;
62
      *)   prints=false ;;
63
esac],[prints=false])   
64
			
65
if test "x$prints" == "xtrue"; then
66
   echo "enabling prints"
67
   AC_DEFINE_UNQUOTED(FS_ENABLE_PRINTS,1, 
68
   [prints enabled])
69
fi
70
71
72
73
# platform -- currently, only posix is supported
74
AC_ARG_WITH(platform,	[AC_HELP_STRING([--with-platform],
75
	[platform to build for: posix])],
76
[case "${with_platform}" in
77
      posix)  NOTA_PLATFORM=${with_platform};;
78
      *)              AC_MSG_ERROR([unsupported platform]);;
79
 esac], [NOTA_PLATFORM=posix])
80
AC_SUBST(NOTA_PLATFORM)
81
82
# A fixed service ID for File Service
83
AC_ARG_WITH(service_id,
84
            AC_HELP_STRING([--with-service-id],[Give a service ID for File Service]),
85
            service_id="$withval", service_id="0")
86
if test $service_id -gt "0" -a $service_id -lt "1000000" ; then
87
  FS_FIXED_SID="-DFS_SERVICE_ID=$service_id"
88
  AC_SUBST(FS_FIXED_SID)
89
  FS_SID_INFO="$service_id"
90
else
91
  FS_USE_RM_SERVICE="-DUSE_RM_SERVICE"
92
  AC_SUBST(FS_USE_RM_SERVICE)
93
  FS_SID_INFO="RM in use"
94
fi
95
96
NOTA_PLATFORM_STUBS="rm_stub/${NOTA_PLATFORM}"
97
AC_SUBST(NOTA_PLATFORM_STUBS)
98
NOTA_PLATFORM_FSSTUBS="fs_stub/${NOTA_PLATFORM}"
99
AC_SUBST(NOTA_PLATFORM_FSSTUBS)
100
101
NOTA_LARGEFILE=`getconf LFS64_CFLAGS`
102
AC_SUBST(NOTA_LARGEFILE)
103
104
AC_PATH_PROG([NOTA_STUBGENERATOR],[nota-stubgen3.pl],[no])
105
AS_IF(test "x$NOTA_STUBGENERATOR" = "xno",AC_MSG_WARN([stubgenerator not found]))
106
107
AM_CONDITIONAL(NOTA_HAVE_LIBXML_PERL, test "x$have_libxml" = "xyes")
108
109
110
AC_OUTPUT([
111
Makefile
112
rm_stub/Makefile
113
rm_stub/posix/Makefile
114
rm_stub/posix/user/Makefile
115
rm_stub/posix/common/Makefile
116
rm_stub/common/Makefile
117
fs_stub/Makefile
118
fs_stub/posix/Makefile
119
fs_stub/posix/service/Makefile
120
fs_stub/posix/user/Makefile
121
fs_stub/posix/common/Makefile
122
fs_stub/common/Makefile
123
src/Makefile
124
test/Makefile
125
])
126
127
echo
128
echo "FS configure results"
129
echo "-----------------------------------"
130
echo "Platform             : ${NOTA_PLATFORM}"
131
echo "Secure registration  : ${sec_reg}"
132
echo "Stubgen              : ${NOTA_STUBGENERATOR}"
133
echo "Prints in file SN    : ${prints}"
134
echo ""
135
echo "File Service ID      : $FS_SID_INFO"
136
echo "Prefix               : ${prefix}"
137
echo "CFLAGS               : $CFLAGS"
138
echo ""
139
echo "Now, run 'make' to compile file service"