source: mod_gnutls/m4/mod_ftpd_providers.m4 @ abce298

debian/masterdebian/stretch-backportsjessie-backportsmsvaupstream
Last change on this file since abce298 was abce298, checked in by Nokis Mavrogiannopoulos <nmav@…>, 12 years ago

added new m4 directory

  • Property mode set to 100644
File size: 3.2 KB
Line 
1dnl This file is Copyright 2003,2004 Edward Rudd
2dnl Usage, modification, and distribution of this file in other projects is
3dnl allowed and encouraged so long as this copyright notice is retained.
4dnl You are encouraged to send any patches to the me at
5dnl urkle <at> outoforder <dot> cc, but this is not a requirement
6
7dnl
8dnl MOD_FTPD_OUTPUT(file)
9dnl adds "file" to the list of files generated by AC_OUPUT
10AC_DEFUN([MOD_FTP_OUTPUT], [
11    MOD_FTPD_OUTPUT_FILES="$MOD_FTPD_OUTPUT_FILES $1"
12])dnl
13
14dnl
15dnl MOD_FTPD_PROVIDER(name, helptext[, default[, config]]]])
16dnl default is one of:
17dnl   yes    -- enabled by default. user must explicitly disable.
18dnl   no     -- disabled under default, most, all. user must explicitly enable.
19dnl   most   -- disabled by default. enabled explicitly or with most or all.
20dnl   ""     -- disabled under default, most. enabled explicitly or with all.
21dnl
22dnl basically: yes/no is a hard setting. "most" means follow the "most"
23dnl            setting. otherwise, fall under the "all" setting.
24dnl            explicit yes/no always overrides.
25dnl
26AC_DEFUN([MOD_FTPD_PROVIDER],[
27    AC_MSG_CHECKING(whether to enable mod_ftpd_$1)
28    define([optname],[--]ifelse($3,yes,disable,enable)[-]translit($1,_,-))dnl
29    AC_ARG_ENABLE(translit($1,_,-),AC_HELP_STRING(optname(),$2),,enable_$1=ifelse($3,,maybe-all,$3))
30    undefine([optname])dnl
31    _apmod_extra_msg=""
32
33    if test "$provider_selection" = "most" -a "$enable_$1" = "most"; then
34    _apmod_error_fatal=no
35    else
36    _apmod_error_fatal=yes
37    fi
38
39    if test "$enable_$1" = "yes"; then
40        _apmod_extra_msg=" ($provider_selection)"
41    elif test "$enable_$1" = "most"; then
42    if test "$provider_selection" = "most" -o "$provider_selection" = "all"; then
43        enable_$1=yes
44        _apmod_extra_msg=" ($provider_selection)"
45    elif test "$enable_$1" != "yes"; then
46        enable_$1=no
47    fi
48    elif test "$enable_$1" = "maybe-all"; then
49    if test "$provider_selection" = "all"; then
50        enable_$1=yes
51        _apmod_extra_msg=" (all)"
52    else
53        enable_$1=no
54    fi
55    fi
56    if test "$enable_$1" != "no"; then
57    ifelse([$4],,:,[AC_MSG_RESULT([checking dependencies])
58            $4
59            AC_MSG_CHECKING(whether to enable mod_$1)
60            if test "$enable_$1" = "no"; then
61                if test "$_apmod_error_fatal" = "no"; then
62                _apmod_extra_msg=" (disabled)"
63                else
64                AC_MSG_ERROR([mod_ftpd_$1 has been requested by can not be build due to prerequisite failure])
65                fi
66            fi])
67    fi
68    AC_MSG_RESULT($enable_$1$_apmod_extra_msg)
69    if test "$enable_$1" != "no"; then
70    PROVIDER_LIST="$PROVIDER_LIST $provider_dir/$1"
71    fi
72])dnl
73
74dnl
75dnl MOD_FTPD_INCLUDE_PROVIDERS(directory)
76dnl searches directory for mod_ftpd provider config.m4 files
77dnl
78AC_DEFUN([MOD_FTPD_INCLUDE_PROVIDERS],[
79    AC_ARG_ENABLE(providers,
80    AC_HELP_STRING([--enable-providers=PROVIDER-LIST],[Providers to enable]),[
81    for i in $enableval; do
82        if test "$i" = "all" -o "$i" = "most"; then
83        provider_selection=$i
84        else
85        eval "enable_$i=yes"
86        fi
87    done
88        ],
89    provider_selection=most
90    )
91
92    provider_dir=$1
93    esyscmd(./config-stubs $provider_dir)
94
95    AC_CONFIG_SUBDIRS($PROVIDER_LIST)
96])dnl
Note: See TracBrowser for help on using the repository browser.