source: filezilla/trunk/fuentes/configure.ac @ 3185

Last change on this file since 3185 was 3185, checked in by jrpelegrina, 2 years ago

Update new version: 3.15.02

File size: 22.3 KB
Line 
1AC_INIT([FileZilla],[3.15.0.2],[tim.kosse@filezilla-project.org],[],[https://filezilla-project.org/])
2AC_CONFIG_HEADERS([src/include/config.h])
3AC_CONFIG_MACRO_DIR([m4])
4AC_CONFIG_AUX_DIR(config)
5AM_INIT_AUTOMAKE([dist-bzip2])
6
7AC_CANONICAL_HOST
8
9AC_PROG_CXX
10AM_PROG_CC_C_O
11AC_PROG_INSTALL
12
13LT_INIT
14LT_LANG([C++])
15
16AC_CACHE_SAVE
17
18AC_ARG_ENABLE(locales, AS_HELP_STRING([--enable-locales],[Build message catalogs]), \
19        [locales="$enableval"], [locales="yes"])
20
21# Todo: Investigate using sub-configure scripts
22AC_ARG_ENABLE(localesonly, AS_HELP_STRING([--enable-localesonly],[Just build locales]), \
23        [localesonly="$enableval"], [localesonly="no"])
24
25if test "$locales" != "yes" -a "$localesonly" = "yes"; then
26  AC_MSG_ERROR([invalid flags: --disable-locales cannot be used together with --enable-localesonly])
27fi
28
29if test "$localesonly" = "yes"; then
30  buildmain="no"
31else
32  buildmain="yes"
33fi
34
35if ! test "$localesonly" = "yes"; then
36
37  if test "X$GCC" = Xyes; then
38    CFLAGS="$CFLAGS -Wall -g"
39    CXXFLAGS="$CXXFLAGS -Wall -g"
40  fi
41
42  # Check for C++14 support
43  CXX_COMPILE_STDCXX_14([],[mandatory])
44  CHECK_LIBCXX
45
46  # libstdc++ as shipped with GCC 4.7 lacks std::map::emplace
47  FZ_CHECK_MAP_EMPLACE
48
49  # libstdc++ as shipped with GCC 4.7 has a steady clock that isn't steady (who implements such crap?)
50  CHECK_STEADY_CLOCK
51
52  # No thread_local in GCC 4.7 and it for some reason isn't supported on OS X either
53  CHECK_THREAD_LOCAL
54
55  # std::atomic on PPC seems to require -latomic
56  CHECK_ATOMIC
57
58  # Add build information to config.h
59  # ---------------------------------
60
61  # Add host to config.h
62  AC_DEFINE_UNQUOTED(USED_HOST, ["$host"], [Host system under which the program will run.])
63  AC_DEFINE_UNQUOTED(USED_BUILD, ["$build"], [Build system under which the program was compiled on.])
64
65  # Add used CXXFLAGS to config.h
66  AC_DEFINE_UNQUOTED(USED_CXXFLAGS, ["$CXXFLAGS"], [Define to the used CXXFLAGS to compile this package.])
67
68  # Get compiler (version)
69  AH_TEMPLATE(USED_COMPILER, [Define to name and version of used compiler])
70  if COMPILER=`$CC --version | head -n 1`; then
71    AC_DEFINE_UNQUOTED(USED_COMPILER, ["$COMPILER"])
72  fi
73
74  # Get buildtype.
75  AC_ARG_ENABLE(buildtype, AS_HELP_STRING([--enable-buildtype=TYPE],[DO NOT USE. Reserved for use by official maintainer. TYPE can either be 'official' or 'nightly'.]),
76    [buildtype="$enableval"], [buildtype=])
77  buildtype_valid=false
78  if test -z "$buildtype"; then
79    buildtype_valid=true
80  elif test "$buildtype" = "official"; then
81    buildtype_valid=true
82  elif test "$buildtype" = "nightly"; then
83    buildtype_valid=true
84  fi
85
86  if test "$buildtype_valid" != "true"; then
87    AC_MSG_ERROR([invalid buildtype passed])
88  fi
89
90  if ! test -z "$buildtype"; then
91    AC_DEFINE_UNQUOTED(BUILDTYPE, ["$buildtype"], [Buildtype, indicates official builds and nightly builds])
92  fi
93fi
94
95# Shell extension
96# ---------------
97
98AC_MSG_NOTICE([Running sub-configure for shell extension])
99if false; then
100  # For autoreconf machinery
101  AC_CONFIG_SUBDIRS([src/fzshellext])
102fi
103
104OLD_DIR="`pwd`"
105mkdir -p "$OLD_DIR/src/fzshellext/32"
106mkdir -p "$OLD_DIR/src/fzshellext/64"
107
108AC_ARG_ENABLE(shellext, [], \
109        [shellext="$enableval"], [shellext="yes"])
110
111if test "$localesonly" != "yes" && echo $host_os | grep "cygwin\|mingw" > /dev/null 2>&1 && test "$shellext" = "yes"; then
112  cd "$OLD_DIR/src/fzshellext/32" || exit 1
113  "$ac_abs_confdir/src/fzshellext/configure" --prefix="$prefix" --exec-prefix="$exec_prefix" --host=i686-w64-mingw32 || exit 1
114  cd "$OLD_DIR/src/fzshellext/64" || exit 1
115  "$ac_abs_confdir/src/fzshellext/configure" --prefix="$prefix" --exec-prefix="$exec_prefix" --host=x86_64-w64-mingw32 || exit 1
116else
117  cd "$OLD_DIR/src/fzshellext/64" || exit 1
118  "$ac_abs_confdir/src/fzshellext/configure" --disable-shellext || exit 1
119fi
120cd "$OLD_DIR"
121
122
123
124if test "$buildmain" = "yes"; then
125
126  # Require pkg-config
127  # ------------------
128  PKG_PROG_PKG_CONFIG
129  if test -z "$PKG_CONFIG"; then
130    AC_MSG_ERROR([pkg-config not found. pkg-config is required to check for some dependencies.])
131  fi
132 
133  # Find libfilezilla
134  # -----------------
135  PKG_CHECK_MODULES(LIBFILEZILLA, [libfilezilla >= 0.3.0],, [
136        AC_MSG_ERROR([libfilezilla not found. You can download it from https://lib.filezilla-project.org/])
137  ])
138  AC_SUBST(LIBFILEZILLA_CFLAGS)
139  AC_SUBST(LIBFILEZILLA_LIBS)
140
141
142  # Detect wxWidgets
143  # ----------------
144
145  AM_OPTIONS_WXCONFIG
146
147  MIN_WX_VERSION="3.0.2"
148  AM_PATH_WXCONFIG([$MIN_WX_VERSION], [wxWin=1], , [aui,xrc,adv,core,xml,base], [--unicode=yes --universal=no])
149  if test "$wxWin" != 1; then
150    AC_MSG_ERROR([
151        wxWidgets must be installed on your system
152        but either the wx-config script couldn't be found or
153        no compatible wxWidgets configuration has been installed.
154
155        Compatible wxWidgets configurations are the unicode builds
156        of wxGTK, wxMac and wxMSW.
157
158        Please check that wx-config is in path, the directory
159        where wxWidgets libraries are installed (returned by
160        'wx-config --libs' command) is in LD_LIBRARY_PATH or
161        equivalent variable and wxWidgets version is $MIN_WX_VERSION or above.
162    ])
163  fi
164
165  # --universal=no doesn't work correctly, it still accepts universal builds. Reject it manually here.
166  if echo "$WX_CPPFLAGS" | grep __WXUNIVERSAL__ > /dev/null; then
167    AC_MSG_ERROR([wxUniversal is not acceptable as flavour of wxWidgets. Please recompile wxWidgets with --disable-universal])
168  fi
169
170  AC_LANG_PUSH(C++)
171  CPPFLAGS_OLD="$CPPFLAGS"
172  CXXFLAGS_OLD="$CXXFLAGS"
173  CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
174  CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
175  AC_MSG_CHECKING([positional printf argument support in wxWidgets])
176  AC_COMPILE_IFELSE(
177    [AC_LANG_PROGRAM([[
178          #include <wx/wx.h>
179          #if !wxUSE_PRINTF_POS_PARAMS
180            #error wx compiled without wxUSE_PRINTF_POS_PARAMS
181          #endif
182        ]])],
183      AC_MSG_RESULT([yes]),
184      [
185        AC_MSG_RESULT([no])
186        AC_MSG_FAILURE([Positional printf argument support in wxWidgets is required by FileZilla. Please rebuild wxWidgets and pass --enable-printfposparam to its configure script.])
187      ]
188    )
189  CPPFLAGS="$CPPFLAGS_OLD"
190  CXXFLAGS="$CXXFLAGS_OLD"
191  AC_LANG_POP
192
193  AC_SUBST(WX_CONFIG_WITH_ARGS)
194
195  AC_CACHE_SAVE
196
197  # Get OS type for PUTTY frontend
198  # ------------------------------
199
200  AC_MSG_CHECKING([system type for sftp stub])
201  sftpbuild="unix"
202  if echo $host_os | grep "mingw" > /dev/null 2>&1; then sftpbuild="mingw"; fi
203  AC_MSG_RESULT([$sftpbuild])
204
205  # Checks for PuTTY
206  # ----------------
207
208  AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
209  #include <sys/types.h>
210  #include <utmp.h>])
211
212  AC_SEARCH_LIBS([socket], [xnet])
213  AC_SEARCH_LIBS([getaddrinfo], [xnet])
214  AC_SEARCH_LIBS([in6addr_loopback], [socket])
215
216  AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
217  AC_CHECK_FUNCS([gettimeofday ftime])
218  AC_CHECK_FUNCS([in6addr_loopback in6addr_any])
219  AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
220
221  AC_CACHE_CHECK([for SO_PEERCRED and dependencies], [x_cv_linux_so_peercred], [
222      AC_COMPILE_IFELSE([
223          AC_LANG_PROGRAM([[
224              #define _GNU_SOURCE
225              #include <features.h>
226              #include <sys/socket.h>
227            ]],[[
228              struct ucred cr;
229              socklen_t crlen = sizeof(cr);
230              return getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cr, &crlen) +
231              cr.pid + cr.uid + cr.gid;
232            ]]
233          )],
234          AS_VAR_SET(x_cv_linux_so_peercred, yes),
235          AS_VAR_SET(x_cv_linux_so_peercred, no)
236      )
237  ])
238  AS_IF([test AS_VAR_GET(x_cv_linux_so_peercred) = yes],
239      [AC_DEFINE([HAVE_SO_PEERCRED], [1],
240       [Define if SO_PEERCRED works in the Linux fashion.])]
241  )
242fi
243
244if test "$buildmain" = "yes"; then
245
246  # Check for windres on MinGW builds
247  # ---------------------------------
248
249  # Small function to filter the flags for windres,
250  # so that only includes and defines are passed to windres.
251  parseflags() {
252    WINDRESFLAGS=""
253    for opt in "$@"
254    do
255        case "$opt" in
256        -I*)
257            WINDRESFLAGS="$WINDRESFLAGS --include-dir=${opt#-I}"
258            ;;
259        -D*)
260            WINDRESFLAGS="$WINDRESFLAGS $opt"
261            ;;
262        esac
263    done
264  }
265
266  WINDRESFLAGS=
267  use_resourcefile=
268  AC_MSG_CHECKING([whether to use windres])
269  if echo $host_os | grep "cygwin\|mingw" > /dev/null 2>&1; then
270    if echo $WX_CPPFLAGS | grep __WXMSW__ > /dev/null 2>&1; then
271      AC_MSG_RESULT([yes])
272      AC_CHECK_TOOL([WINDRES], [windres])
273      if test "x$WINDRES" = "x"; then
274        AC_MSG_ERROR([windres could not be found, please make sure this program is within your path.])
275      fi
276      use_resourcefile=true
277      parseflags $WX_CPPFLAGS
278
279      FZ_CHECK_ICOPYHOOKW
280    else
281      AC_MSG_RESULT([no])
282    fi
283  else
284    AC_MSG_RESULT([no])
285  fi
286  AC_SUBST(WINDRES)
287  AC_SUBST(WINDRESFLAGS)
288
289  # Set version macros
290  # ------------------
291
292  # version.rc.in needs a major, minor and micro version number
293  vnumber=${PACKAGE_VERSION%-*}
294  PACKAGE_VERSION_MAJOR=${vnumber%%.*}
295  vnumber=${vnumber#$PACKAGE_VERSION_MAJOR}
296  vnumber=${vnumber#.}
297  PACKAGE_VERSION_MINOR=${vnumber%%.*}
298  vnumber=${vnumber#$PACKAGE_VERSION_MINOR}
299  vnumber=${vnumber#.}
300  PACKAGE_VERSION_MICRO=${vnumber%%.*}
301  vnumber=${vnumber#$PACKAGE_VERSION_MICRO}
302  vnumber=${vnumber#.}
303  PACKAGE_VERSION_NANO=${vnumber%%.*}
304
305  if test -z "$PACKAGE_VERSION_MAJOR"; then
306    PACKAGE_VERSION_MAJOR=0
307  fi
308  if test -z "$PACKAGE_VERSION_MINOR"; then
309    PACKAGE_VERSION_MINOR=0
310  fi
311  if test -z "$PACKAGE_VERSION_MICRO"; then
312    PACKAGE_VERSION_MICRO=0
313  fi
314  if test -z "$PACKAGE_VERSION_NANO"; then
315    PACKAGE_VERSION_NANO=0
316  fi
317
318  AC_SUBST(PACKAGE_VERSION_MAJOR)
319  AC_SUBST(PACKAGE_VERSION_MINOR)
320  AC_SUBST(PACKAGE_VERSION_MICRO)
321  AC_SUBST(PACKAGE_VERSION_NANO)
322
323  # Enable DEP and ASLR linker flags
324  # --------------------------------
325
326  AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [LDFLAGS="$LDFLAGS -Wl,--dynamicbase"])
327  AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [LDFLAGS="$LDFLAGS -Wl,--nxcompat"])
328
329  # Set Windows-specific linker flags
330  # ---------------------------------
331  if echo $host_os | grep "cygwin\|mingw" > /dev/null 2>&1; then
332    # We currently require Vista minimum.
333    AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6], [LDFLAGS="$LDFLAGS -Wl,--major-subsystem-version -Wl,6"])
334    AX_CHECK_LINK_FLAG([-Wl,--minor-subsystem-version -Wl,0], [LDFLAGS="$LDFLAGS -Wl,--minor-subsystem-version -Wl,0"])
335    AX_CHECK_LINK_FLAG([-Wl,--major-os-version -Wl,6], [LDFLAGS="$LDFLAGS -Wl,--major-os-version -Wl,6"])
336    AX_CHECK_LINK_FLAG([-Wl,--minor-os-version -Wl,0], [LDFLAGS="$LDFLAGS -Wl,--minor-os-version -Wl,0"])
337
338    # Set the Large Address Aware flag on 32bit Windows
339    if ! echo $host_cpu | grep "x86_64" > /dev/null 2>&1; then
340      AX_CHECK_LINK_FLAG([-Wl,--large-address-aware], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
341    fi
342  fi
343fi
344
345if test "$buildmain" = "yes"; then
346
347  # Mac OS X specific checks
348  # ------------------------
349
350  # Create application bundle on OS X
351  if echo $WX_CPPFLAGS | grep __WXMAC__; then
352    macappbundle="yes"
353  else
354    macappbundle="no"
355  fi
356
357  # Installer creation under Windows
358  # --------------------------------
359
360  # Create installer under Windows
361  if echo $host_os | grep "mingw" > /dev/null 2>&1; then
362    makensisscript="yes"
363    if echo $host_cpu | grep "x86_64" > /dev/null 2>&1; then
364      NSIS_64BIT=1
365    else
366      NSIS_64BIT=0
367    fi
368    AC_SUBST(NSIS_64BIT)
369  else
370    makensisscript="no"
371  fi
372
373  if echo $host_os | grep "mingw" > /dev/null 2>&1; then
374    AC_CONFIG_FILES(data/install.nsi)
375    AC_CONFIG_FILES(data/makezip.sh)
376  fi
377
378  # Libidn checks
379  # -------------
380
381  IDN_LIB=
382  if ! echo $WX_CPPFLAGS | grep __WXMSW__ > /dev/null 2>&1; then
383    AC_LANG_PUSH(C++)
384    AX_CHECK_DEFINE([netdb.h], [AI_IDN],
385      [],
386      [
387        AC_CHECK_HEADER(idna.h,,
388        [
389          AC_MSG_ERROR([idna.h not found which is part of GNU libidn.])
390        ])
391
392        AC_ARG_WITH(idn-lib,
393            AS_HELP_STRING([--with-idn-lib=FILE],[Use the given path to the idn library.]),
394        [
395          if test "$withval" != "yes" -a "$withval" != ""; then
396              IDN_LIB=$withval
397          fi
398        ])
399
400        if test "x$IDN_LIB" = "x"; then
401          AC_CHECK_LIB(idn, stringprep_check_version, IDN_LIB="-lidn",
402                       AC_MSG_ERROR([GNU libidn not found. Try using --with-idn-lib=FILE to specify the library path.])
403                       )
404        fi
405      ])
406    AC_LANG_POP(C++)
407  fi
408  AC_SUBST(IDN_LIB)
409
410  # Binreloc
411  # --------
412
413  # Check if we should use BinReloc
414  AH_TEMPLATE(ENABLE_BINRELOC, [Define ENABLE_BINRELOC on systems where the executable
415                                location can be obtained using /proc/self/maps])
416  AC_MSG_CHECKING([whether to use BinReloc])
417  if echo $host_os | grep -i "cygwin\|mingw\|mac\|apple" > /dev/null 2>&1 ; then
418    use_binreloc=no
419  else
420    use_binreloc=yes
421    AC_DEFINE(ENABLE_BINRELOC)
422  fi
423
424  AC_MSG_RESULT([$use_binreloc])
425
426  # Precompiled headers support
427  # ---------------------------
428
429  AC_MSG_CHECKING([whether to use precompiled headers])
430  use_precomp=""
431  AC_ARG_ENABLE(precomp, AS_HELP_STRING([--enable-precomp],[Use precompiled headers]), \
432                use_precomp="$enableval")
433  if test "x$enable_dependency_tracking" = "xno"; then
434    use_precomp="no"
435  fi
436  if test -z "$use_precomp"; then
437    if test "X$GCC" = Xyes; then
438      if gcc_version=`$CC -dumpversion` > /dev/null 2>&1; then
439        major=`echo $gcc_version | cut -d. -f1`
440        minor=`echo $gcc_version | sed "s/@<:@-,a-z,A-Z@:>@.*//" | cut -d. -f2`
441        if test -z "$major" || test -z "$minor"; then
442          use_precomp=no
443        elif test "$major" -ge 4; then
444          use_precomp=yes
445        else
446          use_precomp=no
447        fi
448      else
449        use_precomp=no
450      fi
451    else
452      use_precomp=no
453    fi
454  fi
455  if test "x$use_precomp" = "xyes"; then
456    CPPFLAGS="$CPPFLAGS -fpch-preprocess"
457    AC_MSG_RESULT([yes])
458  else
459    AC_MSG_RESULT([no])
460  fi
461
462  # CppUnit tests
463  # -------------
464
465  AM_PATH_CPPUNIT([1.10.2], [has_cppunit="yes"])
466
467  # Updatecheck related flags
468  # -------------------------
469
470  AC_ARG_ENABLE(manualupdatecheck, AS_HELP_STRING([--disable-manualupdatecheck],[Disallow the user to manually check for new versions. Implies --disable-autoupdatecheck]),
471    [manualupdatecheck="$enableval"], [manualupdatecheck="yes"])
472
473  if test "$manualupdatecheck" = "no"; then
474    manualupdatecheck="0"
475  else
476    manualupdatecheck="1"
477  fi
478  AC_DEFINE_UNQUOTED(FZ_MANUALUPDATECHECK, $manualupdatecheck, [Set to 1 to enable user initiated update checks])
479
480  AC_ARG_ENABLE(autoupdatecheck, AS_HELP_STRING([--disable-autoupdatecheck],[Disables the ability of FileZilla to check for new versions automatically.]),
481    [autoupdatecheck="$enableval"], [autoupdatecheck="yes"])
482
483  if test "$manualupdatecheck" = "1" -a "$autoupdatecheck" != "no"; then
484    autoupdatecheck="1"
485  else
486    autoupdatecheck="0"
487  fi
488  AC_DEFINE_UNQUOTED(FZ_AUTOUPDATECHECK, $autoupdatecheck, [Set to 1 to add support for automated update checks])
489
490  # GnuTLS
491  # ------
492
493  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.12],, [
494    AC_MSG_ERROR([libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/])
495  ])
496
497  AC_SUBST(LIBGNUTLS_LIBS)
498  AC_SUBST(LIBGNUTLS_CFLAGS)
499
500  AC_ARG_ENABLE(gnutlssystemciphers, AS_HELP_STRING([--enable-gnutlssystemciphers],[Enables the use of gnutls system ciphers.]),
501    [gnutlssystemciphers="$enableval"], [gnutlssystemciphers="no"])
502
503  if test "$gnutlssystemciphers" = "yes"; then
504    AC_DEFINE(FZ_USE_GNUTLS_SYSTEM_CIPHERS, 1, [Set to 1 to use ciphers defined in system policy.])
505  fi
506 
507  # pugixml
508  # ------
509
510  FZ_CHECK_PUGIXML()
511
512  # Libdbus
513  # -------
514
515  AC_ARG_WITH(dbus, AS_HELP_STRING([--with-dbus],[Enable D-Bus support through libdbus. Used for GNOME Session manager D-Bus API. Default: auto]),
516    [
517    ],
518    [
519      with_dbus="auto"
520    ])
521
522  if test "$with_dbus" = "auto"; then
523    if echo $WX_CPPFLAGS | grep __WXMAC__ > /dev/null 2>&1; then
524      with_dbus="no"
525    elif echo $WX_CPPFLAGS | grep __WXMSW__ > /dev/null 2>&1; then
526      with_dbus="no"
527    else
528      with_dbus="yes"
529    fi
530  elif test "$with_dbus" = "yes"; then
531    if echo "$WX_CPPFLAGS" | grep __WXMAC__; then
532      AC_MSG_ERROR([D-Bus support is not needed or available on your platform])
533    elif echo "$WX_CPPFLAGS" | grep __WXMSW__; then
534      AC_MSG_ERROR([D-Bus support is not needed or available on your platform])
535    fi
536  else
537    with_dbus="no"
538  fi
539
540  if test "$with_dbus" != "no"; then
541    PKG_CHECK_MODULES(LIBDBUS, dbus-1 >= 1.2, [with_dbus_v="2"],
542      [
543        PKG_CHECK_MODULES(LIBDBUS, dbus-1, [with_dbus_v="1"],
544          [
545            AC_MSG_ERROR([libdbus not found. Install libdbus or configure with --without-dbus])
546          ])
547      ])
548    AC_DEFINE_UNQUOTED(WITH_LIBDBUS, [$with_dbus_v], [Set to 2 to if libdbus >= 1.2 is available, set to 1 if an older version is available.])
549  fi
550
551  AC_MSG_CHECKING([D-Bus support])
552  AC_MSG_RESULT([$with_dbus])
553
554  # We want xdg-open on *nix
555  if echo "`$WX_CONFIG_WITH_ARGS --basename`" | grep -i gtk > /dev/null 2>&1; then
556    AC_PATH_PROG(xdgopen, xdg-open)
557    if test -z "$xdgopen"; then
558      AC_MSG_WARN([xdg-open not found. This program is the preferred way to launch the default browser. Please make sure that xdg-utils is installed at runtime.])
559    fi
560
561    if echo "`$WX_CONFIG_WITH_ARGS --basename`" | grep -i gtk2 > /dev/null 2>&1; then
562      PKG_CHECK_MODULES(LIBGTK, gtk+-2.0,, [
563        AC_MSG_ERROR([gtk+-2.0 was not found, even though the used version of wxWidgets depends on it. Are you missing the gtk+2.0 development files?])
564      ])
565    fi
566    if echo "`$WX_CONFIG_WITH_ARGS --basename`" | grep -i gtk3 > /dev/null 2>&1; then
567      PKG_CHECK_MODULES(LIBGTK, gtk+-3.0,, [
568        AC_MSG_ERROR([gtk+-3.0 was not found, even though the used version of wxWidgets depends on it. Are you missing the gtk+3.0 development files?])
569      ])
570    fi
571
572    AC_SUBST(LIBGTK_LIBS)
573    AC_SUBST(LIBGTK_CFLAGS)
574  fi
575
576  # Some more obscure platforms (e.g. HP-UX) don't have setenv which is required by POSIX
577  AC_CHECK_FUNC(setenv, [AC_DEFINE([HAVE_SETENV], [1], [Define to 1 if setenv function is available.])], [])
578  AC_CHECK_FUNC(putenv, [AC_DEFINE([HAVE_PUTENV], [1], [Define to 1 if putenv function is available.])], [])
579
580  # Some platforms, e.g. OS X, lack posix_fadvise
581  AC_CHECK_FUNCS(posix_fadvise)
582
583  # Some platforms have no d_type entry in their dirent structure
584  gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
585
586  CHECK_THREADSAFE_LOCALTIME
587  CHECK_THREADSAFE_GMTIME
588  CHECK_INVERSE_GMTIME
589
590  AC_CHECK_FUNCS([clock_gettime])
591  AC_CHECK_DECLS([pthread_condattr_setclock], [], [], [[#include <pthread.h>]])
592
593  # SQLite3
594  # -------
595
596  PKG_CHECK_MODULES(LIBSQLITE3, sqlite3 >= 3.7,, [
597
598    AC_CHECK_HEADER(sqlite3.h,,
599    [
600      AC_MSG_ERROR([sqlite3.h not found which is part of SQLite3.])
601    ])
602
603    AC_CHECK_LIB(sqlite3, sqlite3_version, LIBSQLITE3_LIBS="-lsqlite3",
604    [
605      AC_MSG_ERROR([SQLite3 not found.])
606    ])
607  ])
608
609  AC_SUBST(LIBSQLITE3_LIBS)
610  AC_SUBST(LIBSQLITE3_CFLAGS)
611
612fi
613
614# Everything translation related
615# ------------------------------
616
617FILEZILLA_LINGUAS=
618FILEZILLA_LINGUAS_PO=
619FILEZILLA_LINGUAS_MO=
620FILEZILLA_LINGUAS_PO_NEW=
621
622if test "$locales" = "yes"; then
623  AC_PATH_PROG(xgettext, xgettext)
624  if test -z "$xgettext"; then
625    AC_MSG_ERROR([xgettext not found, please install the GNU gettext package and make sure xgettext is in the path.])
626  fi
627
628  AC_PATH_PROG(msgfmt, msgfmt)
629  if test -z "$msgfmt"; then
630    AC_MSG_ERROR([ msgfmt not found, please install the GNU gettext package and make sure  msgfmt is in the path.])
631  fi
632
633  FZ_PATH_PROG_VER(msgmerge, msgmerge, 0.11.0)
634  if test -z "$msgmerge"; then
635    AC_MSG_ERROR([msgmerge not found or too old, please install a current version of the GNU gettext package and make sure msgmerge is in the path.])
636  fi
637
638  AC_MSG_CHECKING([available FZ3 message catalogs])
639
640  FILEZILLA_LINGUAS_PO=
641  FILEZILLA_LINGUAS=
642
643  if /bin/ls > /dev/null; then
644    LSPROG='/bin/ls'
645  else
646    LSPROG='ls'
647  fi
648
649  if test x$srcdir = x; then
650    path="locales"
651  else
652    path="$srcdir/locales"
653  fi
654  for i in `$LSPROG $path/*.po`; do
655    i=${i%.*}
656    i=${i##*/}
657    FILEZILLA_LINGUAS_PO=$FILEZILLA_LINGUAS_PO${FILEZILLA_LINGUAS_PO:+ }\$\(srcdir\)/$i.po
658    FILEZILLA_LINGUAS_PO_NEW=$FILEZILLA_LINGUAS_PO_NEW${FILEZILLA_LINGUAS_PO_NEW:+ }$i.po.new
659    FILEZILLA_LINGUAS=$FILEZILLA_LINGUAS${FILEZILLA_LINGUAS:+ }$i
660    FILEZILLA_LINGUAS_MO=$FILEZILLA_LINGUAS_MO${FILEZILLA_LINGUAS_MO:+ }$i.mo
661  done
662
663  AC_MSG_RESULT([$FILEZILLA_LINGUAS])
664
665  AC_PATH_PROG([WXRC], [wxrc --version])
666  if test "x$WXRC" = "x"; then
667    AC_MSG_ERROR([
668      wxrc could not be found. This program gets build together with wxWidgets.
669      Please make sure wxrc is within your path.
670    ])
671  fi
672fi
673
674AC_SUBST(FILEZILLA_LINGUAS)
675AC_SUBST(FILEZILLA_LINGUAS_PO)
676AC_SUBST(FILEZILLA_LINGUAS_PO_NEW)
677AC_SUBST(FILEZILLA_LINGUAS_MO)
678
679
680# Output automake conditionals
681# ----------------------------
682
683AM_CONDITIONAL([MINGW], [echo $host_os | grep "mingw" > /dev/null])
684AM_CONDITIONAL([LOCALES_ONLY], [test "$localesonly" = "yes"])
685AM_CONDITIONAL([LOCALES], [test "$locales" = "yes"])
686AM_CONDITIONAL(SFTP_MINGW, [test "$sftpbuild" = "mingw"])
687AM_CONDITIONAL(SFTP_UNIX, [test "$sftpbuild" = "unix"])
688AM_CONDITIONAL(USE_RESOURCEFILE, test "$use_resourcefile" = "true")
689AM_CONDITIONAL(MACAPPBUNDLE, [test "$macappbundle" = "yes"])
690AM_CONDITIONAL(MAKENSISSCRIPT, [test "$makensisscript" = "yes"])
691AM_CONDITIONAL(USE_BINRELOC, test "$use_binreloc" = "yes")
692AM_CONDITIONAL(ENABLE_PRECOMP, test "x$use_precomp" = "xyes")
693AM_CONDITIONAL(HAS_CPPUNIT, [test "$has_cppunit" = "yes"])
694AM_CONDITIONAL(HAVE_LIBPUGIXML, [test "x$with_pugixml" = "xsystem"])
695AM_CONDITIONAL(HAVE_DBUS, [test "x$with_dbus" = "xyes"])
696
697AC_CONFIG_FILES(Makefile src/Makefile src/engine/Makefile src/pugixml/Makefile
698src/dbus/Makefile
699src/interface/Makefile src/interface/resources/Makefile src/include/Makefile
700locales/Makefile src/interface/resources/16x16/Makefile
701src/interface/resources/32x32/Makefile data/Makefile
702src/interface/resources/cyril/Makefile
703src/interface/resources/cyril/16x16/Makefile
704src/interface/resources/blukis/Makefile
705src/interface/resources/flatzilla/Makefile
706src/interface/resources/lone/Makefile
707src/interface/resources/minimal/Makefile
708src/interface/resources/opencrystal/Makefile
709src/interface/resources/sun/Makefile
710src/interface/resources/tango/Makefile
711src/putty/Makefile
712src/putty/unix/Makefile
713src/putty/windows/Makefile
714tests/Makefile
715src/interface/resources/version.rc
716src/interface/resources/MacInfo.plist
717src/fzshellext/version.rc)
718AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.