1dnl ProFTPD - mod_vroot
2dnl Copyright (c) 2016 TJ Saunders <tj@castaglia.org>
3dnl
4dnl This program is free software; you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation; either version 2 of the License, or
7dnl (at your option) any later version.
8dnl
9dnl This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12dnl GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software
16dnl Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17dnl
18dnl Process this file with autoconf to produce a configure script.
19
20AC_INIT(./mod_vroot.c)
21
22AC_CANONICAL_SYSTEM
23
24ostype=`echo $build_os | sed 's/\..*$//g' | sed 's/-.*//g' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
25
26AC_PROG_CC
27AC_PROG_CPP
28AC_AIX
29AC_ISC_POSIX
30AC_MINIX
31AC_PROG_MAKE_SET
32
33dnl Need to support/handle the --enable-devel option, to see if coverage
34dnl is being used
35AC_ARG_ENABLE(devel,
36  [AC_HELP_STRING(
37    [--enable-devel],
38    [enable developer-only code (default=no)])
39  ],
40  [
41    if test x"$enableval" != xno ; then
42      if test `echo $enableval | grep -c coverage` = "1" ; then
43        UTILS_LIBS="--coverage $UTILS_LIBS"
44      fi
45    fi
46  ])
47
48dnl Need to support/handle the --with-includes and --with-libraries options
49AC_ARG_WITH(includes,
50  [AC_HELP_STRING(
51    [--with-includes=LIST],
52    [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])
53  ],
54  [ ac_addl_includes=`echo "$withval" | sed -e 's/:/ /g'` ;
55    for ainclude in $ac_addl_includes; do
56      if test x"$ac_build_addl_includes" = x ; then
57        ac_build_addl_includes="-I$ainclude"
58      else
59        ac_build_addl_includes="-I$ainclude $ac_build_addl_includes"
60      fi
61    done
62    CPPFLAGS="$CPPFLAGS $ac_build_addl_includes"
63  ])
64
65AC_ARG_WITH(libraries,
66  [AC_HELP_STRING(
67    [--with-libraries=LIST],
68    [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])
69  ],
70  [ ac_addl_libdirs=`echo "$withval" | sed -e 's/:/ /g'` ;
71    for alibdir in $ac_addl_libdirs; do
72      if test x"$ac_build_addl_libdirs" = x ; then
73        ac_build_addl_libdirs="-L$alibdir"
74      else
75        ac_build_addl_libdirs="-L$alibdir $ac_build_addl_libdirs"
76      fi
77    done
78    LDFLAGS="$LDFLAGS $ac_build_addl_libdirs"
79  ])
80
81AC_HEADER_STDC
82AC_CHECK_HEADERS(stdlib.h unistd.h)
83
84INCLUDES="$ac_build_addl_includes"
85LIBDIRS="$ac_build_addl_libdirs"
86
87AC_SUBST(INCLUDES)
88AC_SUBST(LDFLAGS)
89AC_SUBST(LIBDIRS)
90
91AC_CONFIG_HEADER(mod_vroot.h)
92AC_OUTPUT(
93  t/Makefile
94  Makefile
95)
96