File: configure.ac

package info (click to toggle)
globus-gridftp-server 11.8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,420 kB
  • ctags: 2,242
  • sloc: ansic: 40,802; sh: 12,009; makefile: 276; perl: 74
file content (249 lines) | stat: -rw-r--r-- 7,711 bytes parent folder | download
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
AC_PREREQ([2.60])

AC_INIT([globus_gridftp_server],[11.8],[https://github.com/globus/globus-toolkit/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
AC_SUBST([AGE_VERSION], [5])
AC_SUBST([PACKAGE_DEPS], ["globus-common >= 16, globus-xio >= 5, globus-xio-gsi-driver >= 2, globus-gfork >= 3, globus-gridftp-server-control >= 4, globus-ftp-control >= 7, globus-authz >= 2, globus-usage >= 3, globus-gssapi-gsi >= 10, globus-gss-assist >= 9, globus-gsi-credential >= 6, globus-gsi-sysconfig >= 5, globus-io >= 9"])

AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11 foreign parallel-tests tar-pax])
LT_INIT([dlopen win32-dll])
AC_PROG_CC_C99

m4_include([dirt.sh])
AC_SUBST(DIRT_TIMESTAMP)
AC_SUBST(DIRT_BRANCH_ID)

PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0],
    [OPENSSL_PKGCONFIG="openssl >= 1.0"],
    [
        PKG_CHECK_MODULES([OPENSSL], [openssl101e])
        OPENSSL_PKGCONFIG="openssl101e"
    ])

AC_SUBST([OPENSSL_PKGCONFIG])
PKG_CHECK_MODULES([PACKAGE_DEP], $PACKAGE_DEPS)

PKG_CHECK_MODULES([ZLIB], [zlib],,
    AC_CHECK_LIB([z], [adler32], [ZLIB_LIBS="-lz"], 
        AC_MSG_ERROR([zlib not found.])))
AC_SUBST([ZLIB_LIBS])

AC_ARG_WITH([preloaded-modules],
    AS_HELP_STRING([--with-preloaded-modules=MODULE,...],
        [Use libtool to preload MODULES when built statically]),
    [if test x"$withval" != x; then
        preload_modules="$withval"
    fi])

if test "x$preload_modules" = x; then
    preload_modules="globus-xio-gsi-driver globus-xio-pipe-driver"
fi

dlpreopen_links=""
dlopen_links=""
link_with_cxx=0
if test x"$preload_modules" != x; then
    preload_modules="$(echo $preload_modules | tr , ' ')"
    for module in $preload_modules; do
        module_found=no
        AC_MSG_CHECKING([for $module module])
        PKG_CHECK_EXISTS([$module], [
            dlopen_links="${dlopen_links:+$dlopen_links }$($PKG_CONFIG --variable=dlopen $module)"
            dlpreopen_links="${dlpreopen_links:+$dlpreopen_links }$($PKG_CONFIG --variable=dlpreopen $module)"
            module_found=yes],
            [module_found=no])
        AC_MSG_RESULT([$module_found])
        if test x"$module" = x"globus-xio-udt-driver"; then
            link_with_cxx=1
        fi
    done
fi

AC_PROG_CXX

AC_SUBST([MODULE_DLPREOPEN], [$dlpreopen_links])
AC_SUBST([MODULE_DLOPEN], [$dlpen_links])

if test "x$link_with_cxx" = x1; then
    AC_MSG_NOTICE([Linking with C++])
fi

AC_PATH_PROGS([OPENSSL], openssl)
AM_CONDITIONAL([ENABLE_TESTS], [test x"$OPENSSL" != x])
AM_CONDITIONAL([LINK_WITH_CXX], [test x"$link_with_cxx" = x1])

AC_MSG_CHECKING([builtin modules])
m4_define([gridftp_modules], m4_normalize(
    m4_esyscmd([ls modules/*/Makefile.am | cut -d/ -f2])))
m4_define([modules_dirs], m4_normalize(m4_foreach(modn, m4_split(gridftp_modules),
    [modules/]modn[ ])))
m4_define([modules_makefiles], 
    m4_normalize(m4_foreach(modd, m4_split(modules_dirs),
        [modd[/Makefile ]])))
m4_define([modules_libs], m4_normalize(
    m4_foreach(modl, m4_split(gridftp_modules),
    [[modules/]modl[/libglobus_gridftp_server_]modl[.la ]])))
m4_define([builtin_extensions_dec], m4_foreach(modl, m4_split(gridftp_modules),
    [[GlobusExtensionDeclareModule(globus_gridftp_server_]modl[);]]))
m4_define([builtin_extensions_def],
    m4_foreach(modl, m4_split(gridftp_modules),
    [[{\"globus_gridftp_server_]modl[\", GlobusExtensionMyModule(globus_gridftp_server_]modl[)},]]))
MODULE_DIRS="gridftp_modules"
MODULE_LIBS="modules_libs"
MODULE_MAKEFILES="modules_makefiles"
BUILTIN_EXTENSIONS_DEC="builtin_extensions_dec"
BUILTIN_EXTENSIONS_DEF="builtin_extensions_def"
AC_MSG_RESULT(gridftp_modules)

if test "X$GRIDMAP" != "X" ; then
    GRIDMAP_CONF="-df $GRIDMAP"
else
    if test -f $HOME/.gridmap ; then
        GRIDMAP_CONF="-df $HOME/.gridmap"
    else
        if test -f /etc/grid-security/grid-mapfile ; then
            GRIDMAP_CONF="-df /etc/grid-security/grid-mapfile"
        else
            GRIDMAP_CONF=""
        fi
    fi
fi

AC_SUBST(GRIDMAP_CONF)
AC_SUBST(GLOBUS_LOCATION)
AC_SUBST(MODULE_DIRS)
AC_SUBST(MODULE_LIBS)
AC_SUBST(BUILTIN_EXTENSIONS_DEC)
AC_SUBST(BUILTIN_EXTENSIONS_DEF)

AC_CHECK_FUNCS(fgetpwent)
AC_C_BIGENDIAN

AC_PATH_PROGS(PERL, perl perl5)

GLOBUS_COMMON_PATH="$("$PKG_CONFIG" --variable=path globus-common)"
AC_PATH_PROG([GLOBUS_VERSION_PROG], [globus-version], [],
             [$GLOBUS_COMMON_PATH$PATH_SEPARATOR$PATH])
AC_MSG_CHECKING([Toolkit version])
if test "X$GLOBUS_TOOLKIT_ID" = "X"; then
    if test "X$GLOBUS_VERSION" = "X"; then
        if test -x "$GLOBUS_VERSION_PROG"; then
            GLOBUS_TOOLKIT_ID="$("$GLOBUS_VERSION_PROG" -full)"
        else
            GLOBUS_TOOLKIT_ID="unknown"
        fi
    else
        GLOBUS_TOOLKIT_ID="Globus Toolkit $GLOBUS_VERSION"
    fi
fi
AC_MSG_RESULT($GLOBUS_TOOLKIT_ID)
AC_SUBST(GLOBUS_TOOLKIT_ID)

reset_exec_prefix_to_none=0
if test x"${exec_prefix}" = xNONE; then
    reset_exec_prefix_to_none=1
    exec_prefix="${prefix}"
fi
eval "conf_sbindir=\"$sbindir\""
eval "conf_bindir=\"$bindir\""
eval "conf_libdir=\"$libdir\""
eval "conf_sysconfdir=\"$sysconfdir\""
eval "conf_localstatedir=\"$localstatedir\""

if test "$reset_exec_prefix_to_none" = 1 ; then
    exec_prefix="NONE"
fi

case "$conf_libdir" in
    /usr/lib|/usr/lib64)
        libdir_line=""
        ;;
    *)
        libdir_line="env += LD_LIBRARY_PATH=${conf_libdir}"
        ;;
esac

AC_SUBST(libdir_line)
AC_SUBST(conf_sbindir)
AC_SUBST(conf_bindir)
AC_SUBST(conf_libdir) 
AC_SUBST(conf_sysconfdir) 
AC_SUBST(conf_localstatedir)

AC_ARG_WITH(default-runlevels,
        AC_HELP_STRING(
            [--with-default-runlevels=RUNLEVELS],
            [Choose which System-V style runlevels the gatekeeper service will
             be started on.]),
            [ case "$withval" in
                yes)
                  AC_MSG_WARN([Invalid parameter to --with-default-runlevels])
                  ;;
                no)
                  CHKCONFIG_DEFAULT="-"
                  DEFAULT_START=""
                  DEFAULT_STOP=""
                  ;;
                *)
                  CHKCONFIG_DEFAULT="$withval"
                  for r in 0 1 2 3 4 5 6; do
                      if expr $withval : ".*$r.*" > /dev/null; then
                          DEFAULT_START="${DEFAULT_START:+$DEFAULT_START }$r"
                      else
                          DEFAULT_STOP="${DEFAULT_STOP:+$DEFAULT_STOP }$r"
                      fi
                  done
              esac],
            [
                CHKCONFIG_DEFAULT="-"
                DEFAULT_START=""
                DEFAULT_STOP=""
            ])

if test "$DEFAULT_START" = ""; then
    DEFAULT_START_LINE="#"
else
    DEFAULT_START_LINE="# Default-Start:     $DEFAULT_START"
fi
if test "$DEFAULT_STOP" = ""; then
    DEFAULT_STOP_LINE="#"
else
    DEFAULT_STOP_LINE="# Default-Stop:      $DEFAULT_STOP"
fi

AC_SUBST(CHKCONFIG_DEFAULT)
AC_SUBST(DEFAULT_START_LINE)
AC_SUBST(DEFAULT_STOP_LINE)

AC_PATH_PROG(FAKEROOT, "fakeroot")
AM_CONDITIONAL(TEST_FAKEROOT, test -n "$FAKEROOT")


AC_PATH_PROGS([A2X], [a2x a2x.py])
AM_CONDITIONAL(BUILD_MANPAGES, [test "x$A2X" != x])

AC_CONFIG_HEADERS(globus_i_gridftp_server_config.h)

AC_CONFIG_FILES(
    globus-gridftp-server.pc
    globus-gridftp-server-uninstalled.pc
    globus-gridftp-password
    globus-gridftp-server-enable-sshftp
    Makefile
    modules_makefiles
    modules/Makefile
    init/Makefile
    init/globus-gridftp-server
    init/globus-gridftp-sshftp
    gridftp.conf.default
    gridftp.xinetd.default
    gridftp.gfork.default
    test/Makefile
    test/testcred.cnf
    version.h
    extensions.h)

AC_OUTPUT