# Configure template for wmakerconf # Copyright (C) 1998 Ullrich Hafner # # $Id: configure.in,v 1.57 2001/03/16 16:50:37 hafner Exp hafner $ # $Revision: 1.57 $, $State: Exp $, $Date: 2001/03/16 16:50:37 $ # # Process this file with autoconf to produce a configure script. AC_INIT(src/wmconfig.c) AM_INIT_AUTOMAKE(wmakerconf, 2.12) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_CONFIG_SUBDIRS(data) AC_MSG_CHECKING(for FreeBSD system) uname=`(uname -s) 2>/dev/null` || uname=unknown if test "x$uname" != "xFreeBSD"; then AC_MSG_RESULT([no ($uname system found)]) else urelease=`(uname -r) 2>/dev/null` || urelease==unknown AC_MSG_RESULT([yes (release $urelease)]) AC_DEFINE_UNQUOTED(FREEBSD_SYSTEM, 1, [Define if you are on a FreeBSD system]) fi # option to disable upgrade button # should be used when making RPMS or Debian packages AC_ARG_ENABLE(upgrade,[ --disable-upgrade disable WWW upgrade functions (when building packages)],upgrade=$enableval,upgrade="no") if test "x$upgrade" = xyes; then AC_DEFINE_UNQUOTED(WWWUPDATE, 1, [Use WWW update functions]) fi # WindowMaker datadir and sysconfig dir check # Set prefix to look for Window Maker files if test "x$prefix" != xNONE; then wprefix="$prefix" else wprefix="$ac_default_prefix" fi # wmakerconf 2.0: dataprefix gives the prefix to the WindowMaker data directory # e.g., /usr/local/share if the directory is /usr/local/share/WindowMaker wmakerdataprefix="" AC_ARG_WITH(wmakerdataprefix, [ --with-wmakerdataprefix=PFX Prefix to data files installed by Window Maker (e.g., PFX=/usr/share if the dir WindowMaker/Styles is part of this dir)]) if test "x$with_wmakerdataprefix" != "x"; then wmakerdataprefix=$with_wmakerdataprefix else if test -d $wprefix/share/WindowMaker; then wmakerdataprefix="$wprefix/share" elif test -d /usr/local/share/WindowMaker; then wmakerdataprefix='/usr/local/share' elif test -d /usr/X11R6/lib/X11/WindowMaker; then wmakerdataprefix='/usr/X11R6/lib/X11' else wmakerdataprefix='/usr/share' fi fi AC_MSG_CHECKING(for Window Maker data directory) if test ! -d "$wmakerdataprefix/WindowMaker/Styles"; then AC_MSG_RESULT(missing) AC_MSG_WARN([directory Styles not found in $wmakerdataprefix/WindowMaker. Use option --with-wmakerdataprefix=PFX to find Window Maker data directory]) else AC_MSG_RESULT($wmakerdataprefix/WindowMaker) fi AC_DEFINE_UNQUOTED(WMAKERDATADIR, "$wmakerdataprefix/WindowMaker", [Path to Window Maker data files]) # wmakerconf 2.0: etcprefix gives the prefix to the WindowMaker sysconfig dir # e.g., /etc/X11 if the directory is /etc/X11/WindowMaker wmakeretcprefix="" AC_ARG_WITH(wmakeretcprefix, [ --with-wmakeretcprefix=PFX Prefix to sysconfig files installed by Window Maker (e.g., PFX=/etc if the file WindowMaker/menu is part of this dir)]) if test "x$with_wmakeretcprefix" != "x"; then wmakeretcprefix=$with_wmakeretcprefix else if test -d $wprefix/etc/WindowMaker; then wmakeretcprefix="$wprefix/etc" elif test -d /usr/local/etc/WindowMaker; then wmakeretcprefix='/usr/local/etc' elif test -d /usr/etc/WindowMaker; then wmakeretcprefix='/usr/etc' elif test -d /etc/WindowMaker; then wmakeretcprefix='/etc' elif test -d /etc/X11/WindowMaker; then wmakeretcprefix='/etc/X11' elif test -d /usr/X11R6/lib/X11/WindowMaker; then wmakeretcprefix='/usr/X11R6/lib/X11' else wmakeretcprefix='/usr/etc' fi fi AC_MSG_CHECKING(for Window Maker sysconfig directory) if test ! -r "$wmakeretcprefix/WindowMaker/menu"; then AC_MSG_RESULT(missing) AC_MSG_WARN([file 'menu' not found in $wmakeretcprefix/WindowMaker. Use option --with-wmakeretcprefix=PFX to find Window Maker sysconfig directory]) else AC_MSG_RESULT($wmakeretcprefix/WindowMaker) fi AC_DEFINE_UNQUOTED(WMAKERDIR, "$wmakeretcprefix/WindowMaker", [Path to Window Maker sysconfig files]) # C Compiler AC_PROG_CC AC_ISC_POSIX AC_PROG_RANLIB AC_SUBST(INCLUDES) #INCLUDES='-DPKGDATADIR=\"$(pkgdatadir)\" -W -Wall -Wmissing-declarations -ansi -pedantic -Wmissing-prototypes -Wstrict-prototypes -D__USE_FIXED_PROTOTYPES__' INCLUDES='-DPKGDATADIR=\"$(pkgdatadir)\"' # Checks for x-includes x-libraries and path /usr/X11R6 # (reported by Mike Nguyen ) if test "$x_includes" != "NONE"; then CPPFLAGS="$CPPFLAGS -I$x_includes" fi if test "$x_libraries" != "NONE"; then LDFLAGS="$LDFLAGS -L$x_libraries" fi # Add some common include and library path's CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/X11/include/ -I/usr/X11R6/include/ -I/usr/X11R6/include/X11 -I/usr/openwin/include -I$wprefix/include" LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib -L$wprefix/lib" # Checks for socket and nsl library, required on Solaris systems # (reported by Peter da Silva ) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(m, cos) libwmfun="no" # Checks for wraster lib AC_PATH_PROG(wraster, get-wings-flags) if test -n "$wraster"; then WRASTERLIBS=`($wraster --ldflags --libs 2>/dev/null || $wraster --lflags --libs) | xargs` WRASTERINCLUDES=`$wraster --cflags` MKPREVIEW="mkpreview" OLD_LDFLAGS="$LDFLAGS" OLD_CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS $WRASTERLIBS" CPPFLAGS="$CPPFLAGS $WRASTERINCLUDES" AC_CHECK_HEADERS(WINGs/WUtil.h,,AC_MSG_ERROR([*** WRASTER >= 0.80.0 not installed - please install first ***])) AC_CHECK_HEADERS(wraster.h, [AC_DEFINE_UNQUOTED(HAVE_WRASTER_H,1,[Define if you have ]) wraster_h="yes"]) if test -n "$wraster_h"; then AC_CHECK_LIB(wraster, RLoadImage, [AC_SUBST(WRASTERLIBS) AC_SUBST(WRASTERINCLUDES) AC_SUBST(MKPREVIEW) previews="yes" usewraster="yes"]) AC_CHECK_LIB(wraster, RFillImage, AC_DEFINE_UNQUOTED(HAVE_WRASTER_0_20,1,[Define if you have libwraster >= 0.20])) AC_CHECK_LIB(wraster, RRenderInterwovenGradient, AC_DEFINE_UNQUOTED(HAVE_INTERWOVEN_GRADIENT,1,[Define if you have libwraster > 0.61.1])) AC_CHECK_LIB(wmfun, drawPlainString, [AC_DEFINE_UNQUOTED(HAVE_LIBWMFUN,1,[Define if you have libwmfun]) libwmfun="yes" WMFUNLIBS="-lwmfun" AC_SUBST(WMFUNLIBS)]) fi LDFLAGS="$OLD_LDFLAGS" CPPFLAGS="$OLD_CPPFLAGS" else AC_MSG_ERROR([*** WRASTER >= 0.80.0 not installed - please install first ***]) fi # Checks for convert if test -z "$previews"; then AC_PATH_PROG(convert, convert) if test -n "$convert"; then previews="yes" AC_DEFINE_UNQUOTED(CONVERT,"$convert",[Path of convert utility]) fi fi if test -n "$previews"; then AC_DEFINE_UNQUOTED(PREVIEWS,1,[Use image previews]) fi # Checks for GTK+ and Imlib AM_PATH_GTK_2_0(2.4.0,, AC_MSG_ERROR([*** GTK >= 2.4.0 not installed - please install first ***])) if test -z "$usewraster"; then AM_PATH_GDK_IMLIB(1.9.3,[AC_DEFINE(HAVE_IMLIB, 1, [Undef if you don't have the gdk_imlib library]) have_imlib="yes"], AC_MSG_WARN([*** IMLIB >= 1.9.3 not installed - please install first ***])) # workaround for imlib 1.9.2 if test "$IMLIB_CONFIG" != "no" ; then IMLIB_LIBS=`$IMLIB_CONFIG --libs` GDK_IMLIB_LIBS="$GDK_IMLIB_LIBS $IMLIB_LIBS" fi else CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" fi # Checks for programs webbrowser=mozilla AC_ARG_WITH(webbrowser, [ --with-webbrowser=PROG Web browser to start when a URL is clicked]) if test "x$with_webbrowser" != "x"; then webbrowser=$with_webbrowser fi AC_PATH_PROG(netscapepath, "$webbrowser") if test -n "$netscapepath"; then AC_DEFINE_UNQUOTED(NETSCAPE, "$netscapepath", [Path of WWW browser]) fi AC_PATH_PROG(grep, grep) if test -n "$grep"; then AC_DEFINE_UNQUOTED(GREP, "$grep", [Define path of file utility]) fi AC_PATH_PROG(gzip, gzip) if test -n "$grep"; then AC_DEFINE_UNQUOTED(GZIP, "$gzip", [Define path of gzip utility]) fi AC_PATH_PROG(gunzip, gunzip) if test -n "$grep"; then AC_DEFINE_UNQUOTED(GUNZIP, "$gunzip", [Define path of gunzip utility]) fi AC_PATH_PROG(bunzip2, bunzip2) if test -n "$grep"; then AC_DEFINE_UNQUOTED(BUNZIP2, "$bunzip2", [Define path of file utility]) fi AC_PATH_PROG(tar, tar) if test -n "$tar"; then AC_DEFINE_UNQUOTED(TAR, "$tar", [Define path of file utility]) fi AC_PATH_PROG(wmconfig, wmconfig) if test -n "$wmconfig"; then AC_DEFINE_UNQUOTED(WMCONFIG, "$wmconfig", [Path of wmconfig utility]) fi AC_PATH_PROG(gnometowmaker, gnome2wmaker) if test -n "$gnometowmaker"; then AC_DEFINE_UNQUOTED(GNOME_TO_WMAKER, "$gnometowmaker", [Define path of gnome2wmaker]) fi AC_PATH_PROGS(kdetowmaker, kde2wmaker wkdemenu.pl) if test -n "$kdetowmaker"; then AC_DEFINE_UNQUOTED(KDE_TO_WMAKER, "$kdetowmaker", [Define path of kde2wmaker]) fi AC_PATH_PROG(getstyle, "getstyle",, $PATH:/usr/local/bin:/usr/X11R6/bin:$wprefix/bin) if test -n "$getstyle"; then AC_DEFINE_UNQUOTED(GETSTYLE, "$getstyle", [Define path of getstyle script]) fi AC_PATH_PROG(setstyle, "setstyle",, $PATH:/usr/local/bin:/usr/X11R6/bin:$wprefix/bin) if test -n "$setstyle"; then AC_DEFINE_UNQUOTED(SETSTYLE, "$setstyle", [Define path of getstyle script]) fi # Checks for perl and (libwww-perl, wget, or lynx) AC_PATH_PROG(perlpath, perl) if test -n "$perlpath"; then AC_DEFINE_UNQUOTED(PERL, "$perlpath", [Path of perl utility]) # Checks for libwww-perl AC_MSG_CHECKING([for libwww-perl]) ac_try="$perlpath -c libwww.pl >/dev/null 2>conftest.out" if eval $ac_try; then GETSCRIPT=libwww.pl AC_MSG_RESULT(yes) www_support="yes" else AC_MSG_RESULT(no) AC_PATH_PROGS(wwwget, lynx wget) if test -n "$wwwget"; then AC_DEFINE_UNQUOTED(WWWGET, "$wwwget", [Path to lynx or wget]) GETSCRIPT=www www_support="yes" fi fi fi # Checks for header files. AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS(string.h stdlib.h assert.h sys/types.h sys/stat.h) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS(popen getpwnam stat remove mkdir rename mkstemp mkdtemp _exit) # I18n ALL_LINGUAS="ca da de es_ES fi fr hu it ja no pl pt_BR ru sv tr ko" AC_SUBST(INSTOBJEXT) INSTOBJEXT=.gmo AM_GNU_GETTEXT AM_GNU_GETTEXT_VERSION(0.10.35) if test "x$gt_cv_func_gettext_libintl" = "xyes"; then LIBS="$LIBS -lintl" fi # Output stuff AC_SUBST(GETSCRIPT) DATADIR=$datadir/wmakerconf AC_SUBST(DATADIR) WWWGET=$wwwget AC_SUBST(WWWGET) if test -n "$www_support"; then AC_DEFINE(WWWREQUEST, 1, [Define if you want to use WWW requests]) fi AC_OUTPUT(Makefile wmakerconf.desktop icons/Makefile src/Makefile scripts/Makefile scripts/upgrade.pl scripts/getfile.pl intl/Makefile po/Makefile.in, [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h]) echo echo "Summary of wmakerconf configuration:" echo echo "Window Maker sysconfig dir: $wmakerdataprefix/WindowMaker" echo "Window Maker data dir: $wmakeretcprefix/WindowMaker" if test -z "$getstyle"; then echo "Themes saving/previewing: disabled (no getstyle [part of wmaker])" else echo "Themes saving/previewing: enabled" fi if test -n "$gunzip"; then echo "Themes unpacking - gunzip: $gunzip" else echo "Themes unpacking - gunzip: no" fi if test -n "$bunzip2"; then echo " - bunzip2: $bunzip2" else echo " - bunzip2: no" fi if test -n "$tar"; then echo " - tar: $tar" else echo " - tar: no" fi if test -n "$tar"; then echo "Themes packing - tar: $tar" if test -n "$gzip"; then echo " - gzip: $gzip" else echo " - gzip: no" fi else echo "Themes packing - tar: no" fi if test -n "$netscapepath"; then echo "Web browser: $netscapepath" else echo "Web browser: disabled" fi if test -z "$www_support"; then echo "Themes WWW installation: disabled (no HTTP request interface found)" else echo "Themes WWW installation: enabled" if test "x$upgrade" = xyes; then echo "WWW upgrade functions: enabled" else echo "WWW upgrade functions: disabled" fi fi if test "x$USE_NLS" = "xyes"; then echo "Native language support: enabled" else echo "Native language support: disabled" fi if test -n "$previews"; then if test -n "$convert"; then echo "Image preview caching: enabled (external)" echo "Gradient previewing: disabled (wraster lib not installed)" else echo "Image preview caching: enabled (internal)" echo "Gradient previewing: enabled" echo "jpeg, png, tiff, gif support: enabled (wraster)" fi else echo "Image preview caching: disabled (no wraster lib or convert)" echo "Gradient previewing: disabled (wraster lib not installed)" fi if test -z "$have_imlib"; then if test -z "$usewraster"; then echo "jpeg, png, tiff, gif support: disabled (no wraster lib or imlib)" fi else echo "jpeg, png, tiff, gif support: enabled (imlib)" fi if test "$libwmfun" = "no"; then echo "Libwmfun support: disabled (libwmfun not installed)" else echo "Libwmfun support: enabled" fi echo