File: configure.in

package info (click to toggle)
sitecopy 1:0.16.6-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 5,668 kB
  • ctags: 5,783
  • sloc: ansic: 48,856; sh: 3,820; makefile: 774; yacc: 291; awk: 58; sed: 27
file content (228 lines) | stat: -rw-r--r-- 6,554 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
dnl   This file is free software; you can redistribute it and/or
dnl   modify it under the terms of the GNU Library General Public
dnl   License as published by the Free Software Foundation; either
dnl   version 2 of the License, or (at your option) any later version.

dnl   This library is distributed in the hope that it will be useful,
dnl   but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl   Library General Public License for more details.

dnl  You should have received a copy of the GNU Library General Public License
dnl   along with this library; see the file COPYING.LIB.  If not, write to
dnl   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl   Boston, MA 02111-1307, USA.        

dnl This configure script is:
dnl  Copyright (C) 2000-2008 Joe Orton (joe@manyfish.co.uk)
dnl Portions are:
dnl  Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl  Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
dnl

dnl Extract the version (sans LF) from .version, created at release-time.
m4_define(sc_version, m4_translit(m4_include(.version), [
]))

AC_INIT([sitecopy], [sc_version], [sitecopy@lyra.org])

AC_CONFIG_SRCDIR(src/sites.c)
AC_CONFIG_HEADER(config.h)

EXTRAOBJS=""
proto_msg=""
top_builddir=`pwd`

AC_DEFINE([_GNU_SOURCE], [1], [Always defined])

NEON_WITH_LIBS

dnl Optional features

AC_ARG_ENABLE(ftp,
 AC_HELP_STRING([--disable-ftp], [disable FTP support]),,
 [enable_ftp=yes])
AC_ARG_ENABLE(webdav,
 AC_HELP_STRING([--disable-webdav], [disable WebDAV support]),,
 [enable_webdav=yes])
AC_ARG_ENABLE(rsh,
 AC_HELP_STRING([--disable-rsh], [disable rsh/rcp support]),,
 [enable_rsh=yes])
AC_ARG_ENABLE(gnomefe,
 AC_HELP_STRING([--enable-gnomefe], [enable GNOME front end]))

dnl Check for programs

AC_PROG_CC
AC_PROG_MAKE_SET
AC_ISC_POSIX
AC_PROG_INSTALL
AC_LANG_C
AC_C_INLINE
AC_C_CONST

AC_HEADER_STDC

AC_EXEEXT

if test "$enable_ftp" = "yes"; then
	EXTRAOBJS="$EXTRAOBJS src/ftp.o src/ftpdriver.o"
	proto_msg="FTP"
	AC_DEFINE(USE_FTP, 1, [Define to compile the FTP protocol driver])
fi

if test "$enable_webdav" = "yes"; then
    # Add the required DAV objects to NEONOBJS
    proto_msg="WebDAV ${proto_msg}"
    EXTRAOBJS="$EXTRAOBJS src/davdriver.o"
    AC_DEFINE(USE_DAV, 1, [Define to compile the WebDAV protocol driver])
fi

# XML parser support is always required
NEON_NEED_XML_PARSER=yes

if test "$enable_rsh" = "yes"; then
    EXTRAOBJS="$EXTRAOBJS src/rshdriver.o"
    proto_msg="rsh/rcp ${proto_msg}"
    AC_DEFINE(USE_RSH, 1, [Define to compile the rsh/rcp protocol driver])
fi

AC_ARG_ENABLE(sftp,
 AC_HELP_STRING([--disable-sftp], [disable sftp/ssh support]),,
 [enable_sftp=no
  AC_CHECK_FUNCS([socketpair pipe], [enable_sftp=yes; break])
 ])

if test "$enable_sftp" = "yes"; then
    EXTRAOBJS="$EXTRAOBJS src/sftpdriver.o"
    proto_msg="sftp/ssh ${proto_msg}"
    AC_DEFINE([USE_SFTP], 1, [Define to compile the sftp/ssh protocol driver])
fi

dnl Strip the binary in debug mode.
NEON_DEBUG(,[LDFLAGS="-s $LDFLAGS"])

dnl Check for library functions

AC_CACHE_CHECK([for GNU fnmatch], [sc_cv_gnu_fnmatch], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fnmatch.h>]], [[int flags = FNM_LEADING_DIR;]])], 
[sc_cv_gnu_fnmatch=yes], [sc_cv_gnu_fnmatch=no])])

if test "$sc_cv_gnu_fnmatch" = "no"; then
   AC_LIBOBJ(lib/fnmatch)
fi

# Support neon 0.24 through 0.30
NE_REQUIRE_VERSIONS([0], [24 25 26 27 28 29 30])

dnl But we don't use zlib or ACL support
NEON_WITHOUT_ZLIB
NEON_WITHOUT_ACL

dnl Build neon
NEON_VPATH_BUNDLED(["\$(top_srcdir)/lib/neon"], ["\$(top_builddir)/lib/neon"], [
	NEON_XML_PARSER([\$(top_srcdir)/lib/expat],
                        [\$(top_builddir)/lib/expat])
	NEON_NORMAL_BUILD
])

dnl Check for getopt_long
AC_CHECK_FUNC(getopt_long,,[AC_LIBOBJ(lib/getopt)
AC_LIBOBJ(lib/getopt1)])

dnl Check for strcasecmp
AC_CHECK_FUNC(strcasecmp,,[AC_LIBOBJ(lib/strcasecmp)])

dnl Check for stuff
AC_CHECK_FUNCS(strdup strsignal strerror memcpy setlocale nl_langinfo)

AC_TYPE_SIGNAL

AC_CHECK_HEADERS(stdarg.h string.h strings.h sys/time.h regex.h \
	locale.h langinfo.h stdlib.h unistd.h limits.h sys/select.h fcntl.h)

SOCKLEN_ARG_TYPE

if test "$enable_gnomefe" = "yes"; then
    AC_CHECK_LIB(pthread, pthread_create, gnome_is_ok=yes, gnome_is_ok=no)
    AM_PATH_LIBGLADE([],[],[gnome])
fi

ALL_LINGUAS="ru fr cs ja de tr nn it"
AM_GNU_GETTEXT([no-libtool])

if test "$USE_NLS" = "yes"; then
    if test "$USE_INCLUDED_LIBINTL" = "yes"; then
	nls_msg="Built using included libintl"
        CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl"
    else
	nls_msg="Built using native support"
    fi
else
    nls_msg="Not built"
fi

NEON_WARNINGS

dnl --------------------------------
dnl FE configuration
dnl --------------------------------

if test "$enable_gnomefe" = "yes"; then
    if test "$gnome_is_ok" = "yes"; then
        EXTRAOBJS="$EXTRAOBJS \$(GNOMEOBJS)"
	LIBS="$LIBS $GNOME_LIBS $GTK_LIBS $GNOME_LIBDIR $GNOMEUI_LIBS $LIBGLADE_LIBS"
	CPPFLAGS="$CPPFLAGS $GNOME_INCLUDEDIR $LIBGLADE_CFLAGS"
	GNOME_SC_HELPDIR="`gnome-config --datadir`/gnome/help/xsitecopy"
	SHORTCUT_LOCATION="`gnome-config --datadir`/gnome/apps/Internet"
	TARGET="xsitecopy"
	fe_msg="GNOME"
    else
        AC_MSG_ERROR([could not find the required GNOME libraries])
    fi
else
    # Console front end
    EXTRAOBJS="$EXTRAOBJS src/console_fe.o"
    AC_LIBOBJ(lib/rpmatch)
    AC_LIBOBJ(lib/yesno)
    fe_msg="Console"
    TARGET="sitecopy"
fi

# This goes in CPPFLAGS so libneon/Makefile can pick up config.h
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)"

dnl Makefile substitutions

AC_SUBST(GNOME_SC_HELPDIR)
AC_SUBST(XSC_HELP)
AC_SUBST(SHORTCUT_LOCATION)
AC_SUBST(EXTRAOBJS)
AC_SUBST(TARGET)

AC_CONFIG_FILES([Makefile lib/neon/Makefile po/Makefile.in intl/Makefile])

AC_OUTPUT

AC_MSG_NOTICE([Configured sitecopy $PACKAGE_VERSION:

  Install prefix:        ${prefix}
  Compiler:              ${CC}
  Frontend:              ${fe_msg} (executable named '${TARGET}')
  Supported protocols:   ${proto_msg}
  neon library:          ${neon_library_message}
  XML Parser:            ${neon_xml_parser_message}
  SSL library:		 ${ne_SSL_message}
  Internationalization:  ${nls_msg}
])


if test "$enable_gnomefe" = "yes"; then
   AC_MSG_NOTICE([The GNOME frontend is currently unmaintained.])
fi

# Create all the necessary directories for VPATH builds.
for i in gnome src intl lib/expat lib/expat/xmltok lib/expat/gennmtab \
         lib/expat/xmlparse; do
  test -d $i || mkdir $i
done