dnl Process this file with autoconf to produce a configure script. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program 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 dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA AC_INIT([worker], [4.10.0]) AC_CONFIG_SRCDIR([src/worker.cc]) AM_CONFIG_HEADER(src/aguix/aguixconfig.h) AM_INIT_AUTOMAKE dnl AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AM_PROG_LEX AC_PROG_YACC AC_LANG([C++]) AC_TRY_COMPILE([], [ int test=0; test=5; ], [], [ AC_MSG_ERROR([The C++ compiler doesn't work or doesn't exists at all! ********************************************************************* * Check your C++ installation (many distributions have a separate * * package for the C++ compiler). * *********************************************************************]) ]) AC_ARG_ENABLE(cxx-check, AS_HELP_STRING([--disable-cxx-check],[skip compiler tests]), [cxx_check=$enableval], [cxx_check=yes]) AX_COMPILER_VENDOR if test "$cxx_check" = "yes"; then old_CXXFLAGS="$CXXFLAGS" cxx14="no" case "$ax_cv_cxx_compiler_vendor" in gnu) AX_GXX_VERSION if test -n "$GXX_VERSION"; then gxx_version_major=$(echo $GXX_VERSION | $AWK -F. '{print int($1)}') gxx_version_minor=$(echo $GXX_VERSION | $AWK -F. '{print int($2)}') gxx_version_patch=$(echo $GXX_VERSION | $AWK -F. '{print int($3)}') if test "$gxx_version_major" -lt "4" -o \( "$gxx_version_major" -eq "4" -a "$gxx_version_minor" -lt "6" \); then AC_MSG_ERROR([ ********************************************************************* * GCC versions lower than 4.6.0 are not supported! * *********************************************************************]) fi dnl 4.9.0/4.9.1 generate wrong code, maybe because of undefined behavior in Worker or a bug in gcc if test "$gxx_version_major" -eq "4" -a "$gxx_version_minor" -eq "9" -a "$gxx_version_patch" -lt "2"; then AC_MSG_ERROR([ ********************************************************************* * Due to a code optimizer problem, GCC 4.9.0/1 is not supported. * * You may install a different compiler version and rerun this * * script like "CXX=g++-4.8 ./configure ..." to use that version. * *********************************************************************]) fi fi ;; clang) AC_MSG_CHECKING([whether Clang is new enough]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4) #error Old clang #endif ]])], [ AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) AC_MSG_ERROR([ ********************************************************************* * Compiling Worker has been tested only with Clang 3.4 and 3.5. * * Use either those or later versions. * * You can disable this check with "--disable-cxx-check" * ********************************************************************* ])]) ;; *) AC_MSG_ERROR([GNU C++ or Clang compiler is required You can disable this check with "--disable-cxx-check" if your C++ compiler is able to compile C++14 code. ]) ;; esac CXXFLAGS="$CXXFLAGS -std=c++14" AC_MSG_CHECKING([whether the C++ works with "-std=c++14"]) AC_TRY_COMPILE([], [ int test=0; test=5; ], [ AC_MSG_RESULT(yes) cxx14=yes ], [ AC_MSG_RESULT(no) CXXFLAGS="$old_CXXFLAGS" ]) if test "$cxx14" = "no"; then AC_MSG_ERROR([Your version of the GNU C++ compiler does not seem to be C++14 compatible. You can disable this check with "--disable-cxx-check" if your C++ compiler is able to compile C++14 code ]) fi fi AC_PROG_INSTALL dnl AC_PROG_RANLIB AC_PROG_AWK AC_PROG_LIBTOOL AC_LIBTOOL_SYS_MAX_CMD_LEN AS_IF([expr \( 0 + $lt_cv_sys_max_cmd_len \) '>=' -1 >/dev/null], [max_cmd_len_to_use=$lt_cv_sys_max_cmd_len], [max_cmd_len_to_use=256 AS_BOX([WARNING: Maximum command line length could not be determined, assuming 256!]) ]) AC_DEFINE_UNQUOTED(MAX_CMD_LEN, $max_cmd_len_to_use, [Set to the maximum length of the command line]) AC_DEFINE(_GNU_SOURCE, 1, [Try to use GNU extensions]) PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [usetests=yes], [usetests=no]) AM_CONDITIONAL([USE_TESTS], [test x$usetests = xyes]) dnl Checks for header files. AC_PATH_X AC_PATH_XTRA if test "$no_x"; then AC_MSG_ERROR([X Window libraries and headers not found! ********************************************************************* * Check your X installation (many distributions have these files in * * the ...devel-packages (e.g. libx11-dev or libX11-devel)). * *********************************************************************]) fi dnl rtti test for visualage compiler on aix if test "$GCC" != "yes"; then case "$CXX" in *xlc*|*xlC*) CXXFLAGS="-qrtti=all $CXXFLAGS" ;; esac fi AVFS_LDFLAGS="" ac_cv_have_avfs=no avfs_too_old=no avfs_insecure_version=no AC_ARG_WITH(avfs,AC_HELP_STRING([--with-avfs],[use avfs (default is YES)]), ac_cv_use_avfs=$withval, ac_cv_use_avfs=yes) if test "$ac_cv_use_avfs" = "yes"; then AC_ARG_WITH(avfs-path,AC_HELP_STRING([--with-avfs-path=PATH],[PATH to avfsconfig (default: autoconfig)]), p="$withval:$PATH", p="$PATH") AC_PATH_PROG(avfsconf,avfs-config,,[$p]) if test -x "$avfsconf"; then avfs_version=$($avfsconf --version) avfs_version_major=$(echo $avfs_version | $AWK -F. '{print int($1)}') avfs_version_minor=$(echo $avfs_version | $AWK -F. '{print int($2)}') avfs_version_patch=$(echo $avfs_version | $AWK -F. '{print int($3)}') if test "$avfs_version_major" -gt "0" -o \ \( "$avfs_version_major" -eq "0" -a "$avfs_version_minor" -gt "9" \) -o \ \( "$avfs_version_major" -eq "0" -a "$avfs_version_minor" -eq "9" -a "$avfs_version_patch" -gt "3" \); then CPPFLAGS="$CPPFLAGS $($avfsconf --cflags)" AVFS_LDFLAGS="$($avfsconf --libs)" AC_DEFINE(HAVE_AVFS, 1, [Define to 1 if your system supports avfs]) ac_cv_have_avfs=yes else avfs_too_old=yes fi if test "$avfs_version_major" -lt "1" -o \ \( "$avfs_version_major" -eq "1" -a "$avfs_version_minor" -lt "1" \) -o \ \( "$avfs_version_major" -eq "1" -a "$avfs_version_minor" -eq "1" -a "$avfs_version_patch" -lt "1" \); then avfs_insecure_version=yes else avfs_insecure_version=no fi fi fi if test "$ac_cv_have_avfs" != "yes"; then AC_SYS_LARGEFILE fi AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) dnl Checks for libraries. dnl AC_CHECK_LIB(X11,XCreateWindow) AC_CHECK_LIB(m,pow) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_TYPE_OFF_T AC_CHECK_SIZEOF(off_t) dnl The next one is more difficult dnl When loff_t isn't available it should be 64bit wide dnl When off_t is already 64bit use it otherwise test for dnl 64bit wide long long and use as fallback off_t no matter dnl how wide it is AC_CHECK_TYPE(loff_t,[AC_CHECK_SIZEOF(loff_t)], [use_off_t=1 AC_TRY_COMPILE([ #if ( SIZEOF_OFF_T == 8 ) # include #else # error #endif ], [int i], [], [AC_CHECK_TYPE(long long, [AC_CHECK_SIZEOF(long long) AC_TRY_COMPILE([ #if ( SIZEOF_LONG_LONG == 8 ) # include #else # error #endif ], [int i], [use_off_t=0 AC_DEFINE([loff_t], [long long], [Define to `long long' if does not define.]) AC_DEFINE([SIZEOF_LOFF_T], [SIZEOF_LONG_LONG]) ],[]) ],[]) ]) if test "$use_off_t" = "1"; then AC_DEFINE([loff_t], [off_t], [Define to `off_t' if does not define.]) AC_DEFINE([SIZEOF_LOFF_T], [SIZEOF_OFF_T]) fi ]) dnl To support large files I need at least this prerequisites dnl 1.sizeof(loff_t) == 8 dnl 2.1.sizeof(off_t) == 8 OR dnl 2.2.defining _LARGEFILE64_SOURCE results in defined _LFS64_... stuff dnl which means nothing other then there are stat64/open64... dnl which big values I can store in loff_t support_lfs=no if test "$enable_largefile" != no; then AC_MSG_CHECKING(whether we can support large files) dnl first test: Can we support it at all? AC_TRY_COMPILE([ #if ( SIZEOF_LOFF_T == 8 ) # include #else # error #endif], [int i], can_lfs=yes, can_lfs=no) if test "$can_lfs" = "yes"; then dnl second test: do we need additional defines AC_TRY_COMPILE([ #if ( SIZEOF_OFF_T == 8 ) # include #else # error #endif], [int i], native_lfs=yes, native_lfs=no) if test "$native_lfs" = "yes"; then support_lfs=yes elif test "$ac_cv_have_avfs" != "yes"; then dnl third test: do we get support when requesting? dnl applies only when not using avfs AC_TRY_COMPILE([ #define _LARGEFILE64_SOURCE 1 #define _LARGEFILE_SOURCE 1 #include #ifndef _LFS_LARGEFILE # error #endif #ifndef _LFS64_LARGEFILE # error #endif #ifndef _LFS64_STDIO # error #endif #include #include #include #include #include ], [struct stat64 buf1; struct dirent64 buf2; struct statvfs64 buf3; stat64( "", &buf1 ); lstat64( "", &buf1 ); open64( "", 0); readdir64( NULL ); statvfs64( "", &buf3 ); ], have_explicit_lfs=yes, have_explicit_lfs=no) if test "$have_explicit_lfs" = "yes"; then AC_DEFINE(HAVE_EXPLICIT_LFS, 1, [Define to 1 if your system supports lfs with open64/...]) support_lfs=yes fi fi fi AC_MSG_RESULT($support_lfs) fi dnl Checks for library functions. AC_CHECK_FUNCS(strverscmp) AC_CHECK_FUNCS(strcasecmp) AC_CHECK_FUNCS(lockf) AC_FUNC_FNMATCH dnl AC_FUNC_GETMNTENT gl_MOUNTLIST AC_MSG_CHECKING([whether GNU fnmatch is available]) AC_TRY_COMPILE([#include ], [fnmatch("","",FNM_CASEFOLD);], [ AC_DEFINE(HAVE_GNU_FNMATCH) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]); AC_FUNC_STRFTIME AC_CHECK_FUNCS(mkdir) dnl AC_CHECK_FUNCS(nanosleep,,[AC_CHECK_LIB(posix4,nanosleep)]) AC_CHECK_FUNCS(nanosleep,, [AC_CHECK_LIB(posix4, nanosleep, [LIBS="$LIBS -lposix4" AC_DEFINE(HAVE_NANOSLEEP) ], [AC_CHECK_LIB(rt, nanosleep, [LIBS="$LIBS -lrt" AC_DEFINE(HAVE_NANOSLEEP)], [no_nanosleep="yes"]) ]) ]) AC_CHECK_FUNCS(usleep,,[no_usleep="yes"]) if test "$no_nanosleep" -a "$no_usleep"; then AC_MSG_ERROR([Neither nanosleep nor usleep was found! ********************************************************************* * Worker need at least on of this. Please contact the author at * * http://www.boomerangsworld.de/cms/worker/support.html * * and I will try to help! * *********************************************************************]) fi AC_CHECK_FUNCS(getcwd gettimeofday mkdir select strstr) dnl how to get file information have_statvfs=no AC_CHECK_HEADERS(sys/statvfs.h,[ AC_CHECK_FUNCS(statvfs,[have_statvfs=yes]) ]) if test "$have_statvfs" = no; then have_statfs_inc=no AC_CHECK_HEADERS(sys/vfs.h,[have_statfs_inc=yes]) AC_CHECK_HEADERS(sys/param.h,[ AC_CHECK_HEADERS(sys/mount.h,[have_statfs_inc=yes],,[#include ]) ]) if test "$have_statfs_inc" = yes; then AC_CHECK_FUNCS(statfs) fi else dnl the include on (some?) SUN systems use statvfs_t instead of struct statvfs dnl so add another check for this AC_MSG_CHECKING([whether statvfs_t is available]) AC_TRY_COMPILE([#include ], [statvfs_t b1;], [ AC_DEFINE(HAVE_STATVFS_T) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]); fi dnl check for sysinfo dnl because it's linux specific use special dnl check to make sure it's really the function dnl I want AC_CHECK_HEADERS(sys/sysinfo.h,[ AC_MSG_CHECKING([whether sysinfo call works as expected]) AC_TRY_LINK([#include ], [struct sysinfo info;sysinfo(&info);info.mem_unit=1;], [ AC_DEFINE(HAVE_SYSINFO) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]); ]) have_regex=no AC_CHECK_HEADER(regex.h, [AC_CHECK_FUNC(regcomp, [AC_CHECK_FUNC(regexec, [AC_CHECK_FUNC(regfree,[AC_DEFINE(HAVE_REGEX) have_regex=yes ]) ] ) ]) ]) dnl I changed from ANSI C signal to POSIX sigaction dnl but it is not needed; I made it optional AC_CHECK_HEADER(signal.h, [AC_CHECK_FUNCS(sigaction)] ) AC_CHECK_FUNCS( snprintf ) AC_CHECK_FUNCS( getopt_long ) dnl check for pthread library AX_PTHREAD([AC_DEFINE(HAVE_LIBPTHREAD) LIBS="$PTHREAD_LIBS $LIBS" CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS" ], [AC_MSG_ERROR([Couldn't find Pthreads library! ********************************************************************* * Worker requires a working Pthreads library * *********************************************************************]) ]) dnl libmagic have_libmagic=no AC_ARG_WITH(libmagic, AS_HELP_STRING([--with-libmagic],[use libmagic library]), [use_libmagic=$withval], [use_libmagic=yes]) if test "$use_libmagic" = "yes"; then AC_CHECK_HEADER(magic.h, [AC_CHECK_LIB(magic,magic_open,[AC_DEFINE(HAVE_LIBMAGIC, 1, [Define to 1 if your system supports libmagic]) LIBS="$LIBS -lmagic" have_libmagic=yes ]) ]) fi dnl check for XIM AC_ARG_ENABLE(xim, AS_HELP_STRING([--disable-xim],[do not use X11 XIM]), [use_xim=$enableval], [use_xim=yes]) if test "$use_xim" = "yes"; then dnl AC_CHECK_LIB(X11,XOpenIM, dnl [AC_DEFINE(USE_XIM)], dnl [use_xim=no], $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS ) AC_DEFINE(USE_XIM) fi dnl UTF8 option AC_ARG_ENABLE(utf8, AS_HELP_STRING([--disable-utf8],[disable utf8 support]), [use_utf8=$enableval], [use_utf8=yes]) if test "$use_utf8" = "no"; then AC_DEFINE(DISABLE_UTF8_SUPPORT) fi dnl AC_ARG_ENABLE(cygwin-workaround, dnl AS_HELP_STRING([--enable-cygwin-workaround],[Enable some cygwin workarounds]), dnl [cygwin_workarounds=$enableval], dnl [cygwin_workarounds=no]) dnl if test "$cygwin_workarounds" = no; then AC_CHECK_FUNCS(shmget shmat shmdt,[AC_DEFINE(HAVE_SHM, 1, [Define to 1 if your system supports shm])]) dnl fi AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[compile some debug information]), [use_debug=$enableval], [use_debug=no]) if test "$use_debug" = yes; then AC_DEFINE(DEBUG) fi dnl check for XFT dnl direct call since PKG_CHECK_EXISTS is only called conditionally PKG_PROG_PKG_CONFIG XFT_LDFLAGS="" ac_cv_have_xft=no have_xft=no AC_ARG_ENABLE(xft, AS_HELP_STRING([--disable-xft],[disable use of XFT font library]), [use_xft=$enableval], [use_xft=yes]) if test "$use_xft" = "yes"; then PKG_CHECK_EXISTS([xft],[ PKG_CHECK_MODULES([XFT],[xft], [have_xft=yes ]) ]) AC_MSG_CHECKING(for xft) if test "$have_xft" = "yes"; then CXXFLAGS="$CXXFLAGS $XFT_CFLAGS" LIBS="$LIBS $XFT_LIBS" AC_DEFINE(HAVE_XFT, 1, [Define to 1 if your system has XFT]) ac_cv_have_xft=yes fi AC_MSG_RESULT($have_xft) fi ac_cv_have_lua=no have_lua=no AC_ARG_ENABLE(lua, AS_HELP_STRING([--disable-lua],[disable use of LUA scripting engine]), [use_lua=$enableval], [use_lua=yes]) if test "$use_lua" = "yes"; then PKG_CHECK_EXISTS([lua],[ PKG_CHECK_MODULES([LUA],[lua], [have_lua=yes ]) ]) if test "$have_lua" = "no"; then PKG_CHECK_EXISTS([lua5.2],[ PKG_CHECK_MODULES([LUA],[lua5.2], [have_lua=yes ]) ]) fi if test "$have_lua" = "no"; then PKG_CHECK_EXISTS([lua5.1],[ PKG_CHECK_MODULES([LUA],[lua5.1], [have_lua=yes ]) ]) fi if test "$have_lua" = "no"; then PKG_CHECK_EXISTS([lua-5.1],[ PKG_CHECK_MODULES([LUA],[lua-5.1], [have_lua=yes ]) ]) fi if test "$have_lua" = "no"; then PKG_CHECK_EXISTS([lua-5.2],[ PKG_CHECK_MODULES([LUA],[lua-5.2], [have_lua=yes ]) ]) fi AC_MSG_CHECKING(for lua) if test "$have_lua" = "yes"; then CXXFLAGS="$CXXFLAGS $LUA_CFLAGS" LIBS="$LIBS $LUA_LIBS" AC_DEFINE(HAVE_LUA, 1, [Define to 1 if your system has LUA]) ac_cv_have_lua=yes fi AC_MSG_RESULT($have_lua) fi dnl check for openssl PKG_CHECK_EXISTS([openssl],[ PKG_CHECK_MODULES([OPENSSL],[openssl], [have_openssl=yes ]) ]) if test "$have_openssl" = "yes"; then CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS" LIBS="$LIBS $OPENSSL_LIBS" AC_DEFINE(HAVE_OPENSSL, 1, [Define to 1 if your system has openssl]) ac_cv_have_openssl=yes AC_CHECK_HEADER(openssl/sha.h, [AC_CHECK_FUNC(SHA256_Init,[AC_DEFINE(HAVE_OPENSSL_SHA256, 1, [Define to 1 if your system support SHA256 from OpenSSL]) have_openssl_sha256=yes]) ]) fi dnl check for getfsent AC_CHECK_HEADERS(fstab.h,[ AC_MSG_CHECKING([checking for getfsent]) AC_TRY_COMPILE([#include ], [struct fstab *fstab_entry;fstab_entry = getfsent();], [ AC_DEFINE([HAVE_GETFSENT],[1],[Define to 1 if getfsent is available]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) dnl check for getmntinfo from FreeBSD AC_CHECK_HEADERS([sys/param.h],[ AC_CHECK_HEADERS([sys/ucred.h],[ AC_CHECK_HEADERS([sys/mount.h],[ AC_MSG_CHECKING([checking for getmntinfo with statfs args]) AC_TRY_COMPILE([#include #include #include ], [struct statfs *mount_entries;int n;n = getmntinfo( &mount_entries, MNT_NOWAIT );], [ AC_DEFINE([HAVE_GETMNTINFO_FBSD],[1],[Define to 1 if getmntinfo is available in statfs variant]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) ]) ]) dnl check for getmntinfo from NetBSD AC_CHECK_HEADERS([sys/types.h],[ AC_CHECK_HEADERS([sys/statvfs.h],[ AC_MSG_CHECKING([checking for getmntinfo with statvfs args]) AC_TRY_COMPILE([#include #include ], [struct statvfs *mount_entries;int n;n = getmntinfo( &mount_entries, ST_NOWAIT );], [ AC_DEFINE([HAVE_GETMNTINFO_NBSD],[1],[Define to 1 if getmntinfo is available in statvfs variant]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ]) ]) AC_ARG_ENABLE(developer, [ --enable-developer compile developer version], use_developer=$enableval, use_developer=no) if test "$use_developer" = yes; then AC_DEFINE(DEVELOPER) fi dnl LIBS=" -lX11 $LIBS" WORKER_LDADD="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $AVFS_LDFLAGS $XFT_LDFLAGS" dnl Checks for header files. AC_SUBST(X_CFLAGS) AC_SUBST(X_PRE_LIBS) AC_SUBST(X_EXTRA_LIBS) AC_SUBST(x_libraries) AC_SUBST(WORKER_LDADD) dnl CPPFLAGS="$CPPFLAGS -Wall" dnl CXXFLAGS="$CXXFLAGS -fcheck-new" dnl Check for compile error when adding X_CFLAGS to CPPFLAGS dnl as I know this is a problem on Solaris AC_CACHE_CHECK(for needed X include dir, ac_cv_dneedxf,[AC_TRY_COMPILE([#include ], [int x; x=0;], ac_cv_dneedxf=no, ac_cv_dneedxf=yes)]) if test x$ac_cv_dneedxf = xyes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" fi dnl Check if XRegisterIMInstantiateCallback can be used as expected if test "$use_xim" = "yes"; then AC_MSG_CHECKING(for good XRegisterIMInstantiateCallback) AC_TRY_COMPILE([#include void AGUIX_im_inst_callback( Display *calldsp, XPointer client_data, XPointer call_data ) { } ], [XRegisterIMInstantiateCallback( NULL, NULL, NULL, NULL, AGUIX_im_inst_callback, (XPointer)0);], xregisterokay=yes, xregisterokay=no ); if test "$xregisterokay" = "yes" ; then AC_DEFINE(XIM_XREGISTER_OKAY) fi AC_MSG_RESULT($xregisterokay) fi dnl Check for XSetIMValues prototype dnl it's not available on my machine if test "$use_xim" = "yes"; then AC_MSG_CHECKING(for XSetIMValues prototype) save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -Werror" AC_TRY_COMPILE([#include ], [XSetIMValues( NULL, NULL );], xsetimvaluespt=yes, xsetimvaluespt=no ); CPPFLAGS=$save_CPPFLAGS if test "$xsetimvaluespt" = "yes" ; then AC_DEFINE(HAVE_XSETIMVALUES_PROTOTYPE) fi AC_MSG_RESULT($xsetimvaluespt) fi have_hal_dbus=no AC_ARG_WITH(hal,AC_HELP_STRING([--with-hal],[use hal (default is YES)]), ac_cv_use_hal=$withval, ac_cv_use_hal=yes) have_dbus=no AC_ARG_WITH(dbus,AC_HELP_STRING([--with-dbus],[use dbus (default is YES)]), ac_cv_use_dbus=$withval, ac_cv_use_dbus=yes) if test "$ac_cv_use_dbus" = "yes"; then PKG_CHECK_EXISTS([dbus-1],[ PKG_CHECK_MODULES([DBUS],[dbus-1], [have_dbus=yes]) ]) AC_MSG_CHECKING(for dbus-1 and hal-storage) if test "$have_dbus" = "yes"; then AC_MSG_RESULT("yes") if test "$ac_cv_use_hal" = "yes"; then PKG_CHECK_EXISTS([hal-storage],[ PKG_CHECK_MODULES([HAL_STORAGE],[hal-storage], [have_hal_dbus=yes]) ]) fi if test "$have_hal_dbus" = "yes"; then AC_MSG_CHECKING(for hal-storage) AC_DEFINE(HAVE_HAL_DBUS, 1, [Define to 1 if your system supports DBUS/HAL]) CXXFLAGS="$CXXFLAGS $DBUS_CFLAGS $HAL_STORAGE_CFLAGS" LIBS="$LIBS $DBUS_LIBS $HAL_STORAGE_LIBS" AC_MSG_RESULT("yes") have_dbus=no else if test "$ac_cv_use_hal" = "yes"; then AC_MSG_CHECKING(for hal-storage) AC_MSG_RESULT("no (using dbus for udisks support)") fi AC_MSG_CHECKING(for dbus) AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if your system supports DBUS]) CXXFLAGS="$CXXFLAGS $DBUS_CFLAGS" LIBS="$LIBS $DBUS_LIBS" AC_MSG_RESULT("yes") fi else AC_MSG_RESULT("no") fi fi dnl check for XConnectionNumber AC_MSG_CHECKING(for XConnectionNumber) save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -Werror" AC_TRY_COMPILE([#include ], [XConnectionNumber( NULL );], xconnectionnumber=yes, xconnectionnumber=no ); CPPFLAGS=$save_CPPFLAGS if test "$xconnectionnumber" = "yes" ; then AC_DEFINE(HAVE_XCONNECTIONNUMBER, 1, [Define to 1 if your system has the XConnectionNumber function]) fi AC_MSG_RESULT($xconnectionnumber) CHECK_XINERAMA([AC_DEFINE(HAVE_XINERAMA, 1, [Define to 1 if your system has Xinerama support]) use_xinerama=yes],[use_xinerama=no]) dnl *********************** dnl * check for -fcheck-new dnl * adapted from vice1.9 configure.in dnl *********************** dnl if test "$GXX" = "yes"; then dnl old_CXXFLAGS="$CXXFLAGS" dnl CXXFLAGS="$CXXFLAGS -fcheck-new" dnl AC_MSG_CHECKING([whether the C++ works with "-fcheck-new"]) dnl AC_TRY_COMPILE([], dnl [ int test=0; test=5; ], dnl [ AC_MSG_RESULT(yes) ], dnl [ AC_MSG_RESULT(no) dnl CXXFLAGS="$old_CXXFLAGS" dnl ]) dnl fi if test "$GXX" = "yes"; then old_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wall" AC_MSG_CHECKING([whether the C++ works with "-Wall"]) AC_TRY_COMPILE([], [ int test=0; test=5; ], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) CXXFLAGS="$old_CXXFLAGS" ]) fi dnl inotify have_inotify=no AC_ARG_ENABLE(inotify, AS_HELP_STRING([--disable-inotify],[disable use of inotify]), [use_inotify=$enableval], [use_inotify=yes]) if test "$use_inotify" = "yes"; then AC_CHECK_HEADER(sys/inotify.h, [AC_CHECK_FUNCS(inotify_init,[AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 if your system supports inotify]) have_inotify=yes], [AC_SEARCH_LIBS([inotify_init], [inotify], [AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 if your system supports inotify]) have_inotify=yes]) ]) ]) fi dnl inotify end if test "$prefix" = NONE; then AC_DEFINE_UNQUOTED(PREFIX, "$ac_default_prefix") instprefix=$ac_default_prefix else AC_DEFINE_UNQUOTED(PREFIX, "$prefix") instprefix=$prefix fi AH_TEMPLATE( [HAVE_NANOSLEEP], [Define to 1 if you have the `nanosleep' function.] ) AH_TEMPLATE( [HAVE_SYSINFO], [Define to 1 if you have the linux `sysinfo' function.] ) AH_TEMPLATE( [HAVE_REGEX], [Define to 1 when regular expressions are available.] ) AH_TEMPLATE( [HAVE_LIBPTHREAD], [Define to 1 if you have the `pthread' library (-lpthread).] ) AH_TEMPLATE( [USE_XIM], [Define to 1 for X11 XIM support.] ) AH_TEMPLATE( [DEBUG], [Define to 1 for a debug version.] ) AH_TEMPLATE( [DEVELOPER], [Define to 1 for a developer version.] ) AH_TEMPLATE( [XIM_XREGISTER_OKAY], [Define to 1 when XRegisterIMInstantiateCallback is okay.] ) AH_TEMPLATE( [HAVE_XSETIMVALUES_PROTOTYPE], [Define to 1 when the prototype for XSetIMValues is available.] ) AH_TEMPLATE( [PREFIX], [Define to the install prefix.] ) AH_TEMPLATE( [HAVE_STATVFS_T], [Define to 1 if you have statvfs_t.] ) AH_TEMPLATE( [DISABLE_UTF8_SUPPORT], [Define to 1 for disabling utf8 support.] ) AH_TEMPLATE( [HAVE_GNU_FNMATCH], [Define to 1 if you have GNU fnmatch.] ) QUOTED_COMPANY_CLANG_ARGS="" for f in $CXXFLAGS; do QUOTED_COMPANY_CLANG_ARGS="$QUOTED_COMPANY_CLANG_ARGS \"$f\"" done for f in $CPPFLAGS; do QUOTED_COMPANY_CLANG_ARGS="$QUOTED_COMPANY_CLANG_ARGS \"$f\"" done AC_SUBST(QUOTED_COMPANY_CLANG_ARGS) AC_CONFIG_FILES([Makefile src/Makefile src/aguix/Makefile scripts/Makefile catalogs/Makefile Icons/Makefile examples/Makefile man/Makefile man/fr/Makefile man/it/Makefile m4/Makefile contrib/Makefile hints/Makefile config-updates/Makefile contrib/dir-locals.el ]) AC_OUTPUT echo "" echo "Configuration finished:" echo " AVFS usage : $ac_cv_have_avfs" if test "$avfs_too_old" = "yes"; then echo " AVFS version too old!" fi if test "$avfs_insecure_version" = "yes"; then echo " AVFS version too old, containing security bugs, please consider update!" fi if test "$ac_cv_use_avfs" = "yes" -a ! "$ac_cv_have_avfs" = "yes"; then echo " *** Get at least version 0.9.5 from http://avf.sourceforge.net/ ***" echo "" fi echo " Large file support : $support_lfs" echo " Regular expressions support : $have_regex" echo " X11 XIM usage : $use_xim" echo " X11 Xinerama support : $use_xinerama" if test "$use_xinerama" != "yes"; then echo " *** To enable support, install libraries:" echo " *** - libxinerama-dev or libXinerama-devel" echo "" fi echo " UTF8 support : $use_utf8" echo " Libmagic support : $have_libmagic" if test "$use_libmagic" = "yes" -a ! "$have_libmagic" = "yes"; then echo " *** To enable support, install libraries:" echo " *** - libmagic-dev or file-devel" echo " *** or get a recent version from ftp://ftp.astron.com/pub/file/ ***" echo "" fi if test "$have_hal_dbus" = "yes"; then echo " DBUS device handling : HAL" elif test "$have_dbus" = "yes"; then echo " DBUS device handling : udisks" else echo " DBUS device handling : no (fallback to fstab mounting)" echo " *** To enable support, install libraries:" echo " *** - libdbus-1-dev or dbus-1-devel" echo " *** - udisks or udisks2 (newer systems)" echo " *** - hal-storage (older systems)" echo "" fi echo " Inotify support : $have_inotify" echo " LUA support : $have_lua" if test "$use_lua" = "yes" -a "$have_lua" != "yes"; then echo " *** To enable support, install libraries:" echo " *** - liblua5.x-dev or lua53-devel" echo "" fi if test "$ac_cv_have_xft" = "yes"; then echo " Font engine : Xft" else echo " Font engine : X11" if test "$use_xft" = "yes"; then echo " *** To enable support for Xft, install libraries:" echo " *** - libxft-dev or libXft-devel" echo "" fi fi if test "$have_openssl_sha256" = "yes"; then echo " OpenSSL SHA256 : yes" else echo " OpenSSL SHA256 : no" echo " *** install openssl-dev for checksumming support" fi if test "$use_debug" = "yes"; then echo " Debug code : $use_debug" fi if test "$use_developer" = "yes"; then echo " Developer version : $use_developer" fi echo " Maximum command line length : $max_cmd_len_to_use" echo "" echo "Installation prefix : $instprefix" echo "" echo " To compile do" echo "" echo " make" echo ""