Debian Codegraph @

contrib/mod_wrap2/configure.in

raw
1 dnl ProFTPD - mod_wrap2
2 dnl Copyright (c) 2012-2017 TJ Saunders <[email protected]>
3 dnl
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
8 dnl
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17 dnl
18 dnl Process this file with autoconf to produce a configure script.
19
20 AC_INIT(./mod_wrap2.c)
21
22 dnl Need to support/handle the --with-includes and --with-libraries options
23 AC_ARG_WITH(includes,
24 [AC_HELP_STRING(
25 [--with-includes=LIST],
26 [add additional include paths to proftpd. LIST is a colon-separated list of include paths to add e.g. --with-includes=/some/mysql/include:/my/include])
27 ],
28 [ ac_addl_includes=`echo "$withval" | sed -e 's/:/ /g'` ;
29 for ainclude in $ac_addl_includes; do
30 if test x"$ac_build_addl_includes" = x ; then
31 ac_build_addl_includes="-I$ainclude"
32 else
33 ac_build_addl_includes="-I$ainclude $ac_build_addl_includes"
34 fi
35 done
36 CPPFLAGS="$CPPFLAGS $ac_build_addl_includes"
37 ])
38
39 AC_ARG_WITH(libraries,
40 [AC_HELP_STRING(
41 [--with-libraries=LIST],
42 [add additional library paths to proftpd. LIST is a colon-separated list of include paths to add e.g. --with-libraries=/some/mysql/libdir:/my/libs])
43 ],
44 [ ac_addl_libdirs=`echo "$withval" | sed -e 's/:/ /g'` ;
45 for alibdir in $ac_addl_libdirs; do
46 if test x"$ac_build_addl_libdirs" = x ; then
47 ac_build_addl_libdirs="-L$alibdir"
48 else
49 ac_build_addl_libdirs="-L$alibdir $ac_build_addl_libdirs"
50 fi
51 done
52 LDFLAGS="$LDFLAGS $ac_build_addl_libdirs"
53 ])
54
55 ac_wrap2_libs=""
56
57 dnl Auto-detection of shadow passwords.
58 AC_ARG_ENABLE(nis,
59 [ --enable-nis enable use of NIS/netgroups (default=no)
60 ],
61 [
62 if test "$enableval" != "no" ; then
63 AC_DEFINE(WRAP2_USE_NIS)
64
65 dnl Hack to make sure that the correct libraries are linked on the right
66 dnl platforms: FreeBSD's libc itself defines the NIS/YP functions, rather
67 dnl than defining those functions in a separate libnsl library. Same
68 dnl for Mac OSX as well, apparently.
69
70 ac_os=`uname`
71 if test x"$ac_os" != xFreeBSD -a x"$ac_os" != xDarwin; then
72 ac_wrap2_libs="$ac_wrap2_libs -lnsl"
73 fi
74 fi ])
75
76 AC_ARG_ENABLE(wrapper-options,
77 [ --enable-wrapper-options
78 enable use of tcpwrapper options (default=no)
79 see hosts_options(5) man page for details
80 ],
81 [
82 if test "$enableval" != "no" ; then
83 AC_DEFINE(WRAP2_USE_OPTIONS)
84 fi
85 ])
86
87 MODULE_LIBS="$ac_wrap2_libs"
88
89 INCLUDES="$ac_build_addl_includes"
90 LIBDIRS="$ac_build_addl_libdirs"
91
92 AC_SUBST(INCLUDES)
93 AC_SUBST(LDFLAGS)
94 AC_SUBST(LIBDIRS)
95 AC_SUBST(MODULE_LIBS)
96
97 AC_CONFIG_HEADER(mod_wrap2.h)
98 AC_OUTPUT(Makefile)