dnl Process this file with autoconf to produce a configure script. dnl $Id: configure.in,v 1.168 2007/05/01 09:26:20 dsmith Exp $ dnl configure.in dnl Autoconf script for SCWM dnl (C) 1998, 1999, 2000 Greg J. Badros and Maciej Stachowiak dnl ## Initialize autoconf ## AC_INIT(src/scwm.c) . $srcdir/SCWM-VERSION AC_PREREQ(2.4) dnl ## Initialize automake ## AM_INIT_AUTOMAKE(scwm, $VERSION, no-define) AM_MAINTAINER_MODE AM_CONFIG_HEADER(include/scwmconfig.h) ## This will try to create the named directory if it does not exist AC_DEFUN([SCWM_ARG_PATH], [ AC_ARG_WITH($1,[$2],[ if test -z "${withval}" || test "yes" = "${withval}" || test "no" = "${withval}"; then AC_MSG_ERROR(missing pathname argument to --with-$1) else if test ! -d "${withval}"; then AC_MSG_WARN(directory for --with-$1: ${withval} does not exist -- creating) mkdir -p ${withval} || mkdirhier ${withval} fi $3 fi], $4) ]) ## This does not permit non-existing directories AC_DEFUN([SCWM_ARG_PATH_MAYBE_EMPTY], [ AC_ARG_WITH($1,[$2],[ if test ! -z "${withval}" && test ! "yes" = "${withval}" && test ! "no" = ${withval} && test ! -d "${withval}"; then AC_MSG_ERROR(invalid pathname argument to --with-$1: ${withval}) else $3 fi], $4) ]) dnl ## Checks for programs ## AC_ARG_ENABLE(cflags, [ --enable-cflags=FLAGS Set CFLAGS to FLAGS [-g -O2]], [case "$enableval" in yes|no) echo "Please specify a parameter for --enable-cflags" exit;; esac CFLAGS="$enableval"; export CFLAGS ]) AC_ARG_ENABLE(cppflags, [ --enable-cppflags=FLAGS Set CPPFLAGS to FLAGS [-g -O2]], [case "$enableval" in yes|no) echo "Please specify a parameter for --enable-cppflags" exit;; esac CPPFLAGS="$enableval"; export CPPFLAGS ]) AC_ARG_ENABLE(cxxflags, [ --enable-cxxflags=FLAGS Set CXXFLAGS to FLAGS [-g -O2]], [case "$enableval" in yes|no) echo "Please specify a parameter for --enable-cxxflags" exit;; esac CXXFLAGS="$enableval"; export CXXFLAGS ]) AC_PROG_CC AC_PROG_CXX AC_CHECK_PROGS(GTAR, gnutar gtar tar, "no") AC_DEFUN([scwm_TAR_IS_GNU_TAR], [AC_MSG_CHECKING(whether $GTAR is GNU tar) AC_CACHE_VAL(scwm_cv_TAR_IS_GNU_TAR, [ if $GTAR --version >/dev/null 2>&1 then scwm_cv_TAR_IS_GNU_TAR="yes"; else scwm_cv_TAR_IS_GNU_TAR="no"; fi])dnl TAR_IS_GNU_TAR="$scwm_cv_TAR_IS_GNU_TAR"; if test "yes" = "$TAR_IS_GNU_TAR" then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ]) scwm_TAR_IS_GNU_TAR if test "no" = "$TAR_IS_GNU_TAR"; then TAR_CF="$GTAR cf"; TAR_SUFFIX="tar"; else TAR_CF="$GTAR zcf"; TAR_SUFFIX="tar.gz"; fi AC_SUBST(TAR_CF) AC_SUBST(TAR_SUFFIX) dnl Ensure compiler sanity on pathological platforms AC_ISC_POSIX AC_AIX AC_MINIX dnl Use ANSI mode AM_PROG_CC_STDC AC_PROG_LIBTOOL if test "NONE" = "$prefix"; then PREFIX_INCLUDES="-I$ac_default_prefix/include" else PREFIX_INCLUDES="-I$prefix/include" fi dnl # check for build-guile # GUILE_BIN_DIR="" GUILE_INCLUDES="" guile_lib_path="" if test "NONE" = "$exec_prefix"; then if test "NONE" = "$prefix"; then guile_lib_path="$ac_default_prefix/lib" else guile_lib_path="$prefix/lib" fi else guile_lib_path="$exec_prefix/lib" fi if test "NONE" = "$prefix"; then GUILE_INCLUDES="-I$ac_default_prefix/include" else GUILE_INCLUDES="-I$prefix/include" fi SCWM_ARG_PATH(guile-prefix, [ --with-guile-prefix=DIR Expect guile to be installed in DIR [optional]], [ AC_MSG_CHECKING(where to expect to find guile) guile_prefix="${withval}" GUILE_BIN_DIR="${guile_prefix}/bin" GUILE_INCLUDES="-I${guile_prefix}/include" guile_lib_path="${guile_prefix}/lib" AC_MSG_RESULT("${guile_prefix}") ]) SCWM_ARG_PATH(guile-exec-prefix, [ --with-guile-exec-prefix=DIR Expect guile binaries to be installed in DIR [optional]], [ AC_MSG_CHECKING(where to expect to find guile binaries) guile_exec_prefix="${withval}" GUILE_BIN_DIR="${guile_exec_prefix}" AC_MSG_RESULT("${guile_exec_prefix}") ]) if test -z "${GUILE_BIN_DIR}"; then AC_PATH_PROGS(GUILE_CONFIG, guile-config build-guile, no) else AC_PATH_PROGS(GUILE_CONFIG, guile-config build-guile, no, ${GUILE_BIN_DIR}) fi if test "no" != "$GUILE_CONFIG"; then AC_MSG_CHECKING(whether guile-config or build-guile works) if (${GUILE_CONFIG} link) >/dev/null 2>&1; then GUILE_CONFIG_works=yes else GUILE_CONFIG_works=no fi AC_MSG_RESULT($GUILE_CONFIG_works) else GUILE_CONFIG_works=no fi if test "no" = "$GUILE_CONFIG_works"; then AC_MSG_ERROR(Need a working guile-config script in your \$PATH --- check installation of Guile-1.8.0 or later) exit -1 fi if test -z "${GUILE_BIN_DIR}"; then AC_PATH_PROG(GUILE, guile, no) else AC_PATH_PROG(GUILE, guile, no, ${GUILE_BIN_DIR}) fi AC_SUBST(GUILE) AC_PATH_PROGS(PERL, perl perl5, no) AC_SUBST(PERL) dnl ## Find paths ## AC_PATH_X AC_PATH_XTRA AM_PATH_LISPDIR SCWM_ARG_PATH(lispdir, [ --with-lispdir=DIR Install Emacs Lisp files in DIR [PREFIX/share/site-lisp]], [ AC_MSG_CHECKING(where .elc files should go) lispdir="${withval}" AC_MSG_RESULT("${lispdir}") ]) PROPLIST_INCLUDES="" PROPLIST_LIBS="" PROPLIST_OBJECTS="" SCWM_ARG_PATH_MAYBE_EMPTY(proplist, [ --with-proplist=DIR Use libPropList installation from DIR can omit DIR to use $prefix ], [ AC_DEFINE(USE_PROPLIST, 1, [Define this if you want to use libproplist]) AC_DEFINE(CL_NO_TRACE, 1, [Define tihs if you want to turn debug support off for cassowary]) HAVE_PROPLIST="yes" AC_MSG_CHECKING(where to expect to find libPropList headers and library) if test -z "${withval}" || test "yes" = "${withval}"; then AC_MSG_RESULT("defaulting to the prefix = ${prefix}") withval=${prefix} else AC_MSG_RESULT("${withval}") fi PROPLIST_INCLUDES="-I${withval}/include" case "$ac_R_nospace" in "yes") prop_lib_path="-L${withval}/lib -R${withval}/lib" ;; "no") prop_lib_path="-L${withval}/lib -R ${withval}/lib" ;; *) prop_lib_path="-L${withval}/lib" ;; esac PROPLIST_LIBS="$prop_lib_path -lPropList" ]) AM_CONDITIONAL(HAVE_PROPLIST, test "$HAVE_PROPLIST" = yes) AC_SUBST(PROPLIST_INCLUDES) AC_SUBST(PROPLIST_LIBS) AC_SUBST(PROPLIST_OBJECTS) ## check for GTL library that cassowary might need AC_LANG_SAVE AC_LANG_CPLUSPLUS dnl below is a hack using -L prefixes with -lGTL in the dnl extra libs position to be sure that it looks in the right place old_libs=$LIBS LIBS="-L${prefix}/lib -L${exec_prefix}/lib -lGTL" GTL_LIB="" dnl AC_CHECK_LIB(GTL, GML_init, [ AC_TRY_LINK_FUNC(GML_init, [ GTL_LIB="-lGTL" dnl AC_DEFINE(HAVE_GTL) ], no_gtl_lib=yes) LIBS="${old_libs}" ## check for cassowary library CASSOWARY_INCLUDES="" CASSOWARY_LIBS="" CASSOWARY_STATIC_LIBS="" CASSOWARY_OBJECTS="" SCWM_ARG_PATH_MAYBE_EMPTY(cassowary, [ --with-cassowary=DIR Use Cassowary constraint solver from DIR can omit DIR to use $prefix ], [ if test "no" = "${withval}"; then AC_MSG_RESULT("****** Cassowary constraint solver is *not* being used") else AC_DEFINE(USE_CASSOWARY, 1, [Define this and use C++ compiler if you want to use constraint solver]) AC_DEFINE(CL_NO_TRACE, 1, [Define tihs if you want to turn debug support off for cassowary]) AC_MSG_CHECKING(where to expect to find cassowary headers and library) if test -z "${withval}" || test "yes" = "${withval}"; then AC_MSG_RESULT("defaulting to the prefix = ${prefix}") withval=${prefix} else AC_MSG_RESULT("${withval}") fi CASSOWARY_INCLUDES="-I${withval}/include" cassolibdir="${withval}/lib" case "$ac_R_nospace" in "yes") cas_lib_path="-L${cassolibdir} -R${cassolibdir}" ;; "no") cas_lib_path="-L${cassolibdir} -R ${cassolibdir}" ;; *) cas_lib_path="-L${cassolibdir}" ;; esac ## Was ${GTL_LIB} below CASSOWARY_LIBS="$cas_lib_path -lconstraints -lcassowary -lstdc++ `cassowary-config --gtllibs || echo ""`" CASSOWARY_STATIC_LIBS="$cassolibdir/libconstraints.a $cassolibdir/libcassowary.a -lstdc++ `cassowary-config --gtllibs || echo ""`" CASSOWARY_OBJECTS='$(cassowary_objs)' fi ]) AC_SUBST(CASSOWARY_INCLUDES) AC_SUBST(CASSOWARY_LIBS) AC_SUBST(CASSOWARY_STATIC_LIBS) AC_SUBST(CASSOWARY_OBJECTS) AC_LANG_RESTORE dnl ## Checks for libraries ## dnl # X Window system checks # if test -z "$x_includes"; then x_includes="/usr/include" fi saved_cflags="$CFLAGS" saved_ldflags="$LDFLAGS" CFLAGS="$X_CFLAGS" LDFLAGS="$X_LDFLAGS $X_LIBS" orig_x_libs="$x_libs" dnl # check for math library AC_CHECK_LIB(m, main) dnl # Check for the X11 library ## AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", no_x11_lib=yes, $X_EXTRA_LIBS) dnl # Check for the Xext library (needed for Shape extention) ## XEXT_LIB="" AC_CHECK_LIB(Xext, XShapeCombineMask, [ XEXT_LIB="-lXext" AC_DEFINE(HAVE_SHAPE, 1, [Define this if your Xext library supports the X extension (wether your server does or not will be determined at runtime]) ], no_xext_lib=yes, $x_libs) dnl # Check for the XTest library (needed for better simulated event support, quoting) ## XTST_LIB="" have_xtest=no AC_CHECK_LIB(Xtst, XTestQueryExtension, [ XTST_LIB="-lXtst" AC_DEFINE(HAVE_XTEST, 1, [Define this if you have libXtst, the XTest X server extension.]) have_xtest=yes ], AC_MSG_WARN(libXtst not found -- simulated events will not be supported) ,$x_libs $XEXT_LIB) AM_CONDITIONAL(HAVE_XTEST, test "$have_xtest" = yes) dnl # Check for the Xpm library # XPM_LIB="" AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, [ XPM_LIB="-lXpm" AC_DEFINE(HAVE_LIBXPM, 1, [Define this if you have libXpm.]) ], AC_MSG_WARN(libXpm not found -- try ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz) , $x_libs) dnl # Check for the Xmu library # XMU_LIB="" AC_CHECK_LIB(Xmu, XmuPrintDefaultErrorMessage, [ XMU_LIB="-lXmu" AC_DEFINE(HAVE_LIBXMU, 1, [Define this if you have libXmu.]) ], , $x_libs) dnl # check if X11 library was compiled with X_LOCALE definition AC_CHECK_LIB(X11, _Xsetlocale, [ AC_DEFINE(X_LOCALE, 1, [Define this if you want to compile with X_LOCALE define.]) ], [], $x_libs) dnl # Check for libSM, libIce SM_LIB="" SESSION_MANAGER_OBJECTS="" AC_CHECK_LIB(SM, SmcOpenConnection, [ AC_CHECK_HEADERS(X11/SM/SMlib.h, [ AC_CHECK_LIB(ICE, IceAddConnectionWatch, [ SM_LIB="-lSM -lICE" SESSION_MANAGER_OBJECTS='$(session_manager_objs)' AC_DEFINE(HAVE_LIBSM_LIBICE, 1, [Define this if you have libSM and libIce for session manager support]) ], AC_MSG_WARN(libICE not found -- no session manager support) , $x_libs) ], AC_MSG_WARN(SMlib.h not found -- no session manager support)) ], AC_MSG_WARN(libSM not found -- no session manager support) , $x_libs -lICE) AC_ARG_ENABLE(dump, [ --enable-dump Enable the --dump option (reqs libunexec.a)], enable_dump=yes, enable_dump=no) if test x"$enable_dump" = x"yes"; then AC_MSG_RESULT(Be sure symlink to libunexec.a exists in src/) UNEXEC_LIB="libunexec.a" AM_CONDITIONAL(ENABLE_DUMP, true) AC_DEFINE(ENABLE_DUMP, 1, [Define this if you want the --dump option]) else AC_MSG_RESULT(No --dump option will exist) AM_CONDITIONAL(ENABLE_DUMP, false) UNEXEC_LIB="" fi AC_SUBST(UNEXEC_LIB) AC_ARG_ENABLE(esd, [ --disable-esd Do not use ESD even if it exists], enable_esd=no, enable_esd=yes) if test x"$enable_esd" = x"no"; then AC_MSG_RESULT(Not using ESD due to --disable-esd option) AM_CONDITIONAL(HAVE_ESD, false) else AM_PATH_ESD(0.2.7, HAVE_ESD=yes, HAVE_ESD=no) AM_CONDITIONAL(HAVE_ESD, test "$HAVE_ESD" = yes) fi AM_PATH_GTK(1.0.0, HAVE_GTK=yes, HAVE_GTK=no) AM_CONDITIONAL(HAVE_GTK, test $HAVE_GTK = yes) HAVE_GNOME_CORBA=no AC_MSG_CHECKING(whether to enable gnome-corba module) AC_ARG_ENABLE(gnome-corba, [ --enable-gnome-corba Use GNOME Corba module ],[ if test "yes" = "$enableval"; then HAVE_GNOME_CORBA=yes AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ],AC_MSG_RESULT(no)) AM_CONDITIONAL(HAVE_GNOME_CORBA, test "$HAVE_GNOME_CORBA" = yes) AC_SUBST(SESSION_MANAGER_OBJECTS) x_cflags="$X_CFLAGS" x_ldflags="$X_LDFLAGS $X_LIBS" AC_SUBST(x_cflags) AC_SUBST(x_includes) AC_SUBST(x_ldflags) AC_SUBST(x_libs) AC_SUBST(XEXT_LIB) AC_SUBST(XTST_LIB) AC_SUBST(XPM_LIB) AC_SUBST(XMU_LIB) AC_SUBST(SM_LIB) CFLAGS="$saved_cflags" LDFLAGS="$saved_ldflags" dnl # Check for readline library # AC_CHECK_LIB(termcap, tgoto, [ AC_CHECK_LIB(readline, readline, [ READLINE_LIB="-lreadline -ltermcap" AC_DEFINE(HAVE_READLINE, 1, [Define this if you have the readline library]) AC_CHECK_LIB(readline, add_history, AC_DEFINE(HAVE_HISTORY, 1, [Define this if your readline also has add_history()]),,"-ltermcap") ], READLINE_LIB="", "-ltermcap") ], AC_CHECK_LIB(ncurses, tgoto, [ AC_CHECK_LIB(readline, readline, [ READLINE_LIB="-lreadline -lncurses" AC_DEFINE(HAVE_READLINE, 1, [Define this if you have the readline library]) AC_CHECK_LIB(readline, add_history, AC_DEFINE(HAVE_HISTORY, 1, [Define this if your readline also has add_history()]),,"-lncurses") ], READLINE_LIB="", "-lncurses") ], READLINE_LIB="")) AC_SUBST(READLINE_LIB) dnl # Guile checks # SCWM_ARG_PATH(guile-lib-prefix, [ --with-guile-lib-prefix=DIR Expect guile libraries to be installed in DIR [optional]], [ AC_MSG_CHECKING(where to expect guile libraries) guile_lib_prefix="${withval}" GUILE_LIB_PRE="-L${guile_lib_prefix}" AC_MSG_RESULT("${guile_lib_prefix}") ]) case "$ac_R_nospace" in "yes") GUILE_LIBS_PRE="-L${guile_lib_path} -R${guile_lib_path}" ;; "no") GUILE_LIBS_PRE="-L${guile_lib_path} -R ${guile_lib_path}" ;; *) GUILE_LIBS_PRE="-L${guile_lib_path}" ;; esac DL_SUPPORT=false dnl FIXJTL: readline is sometimes needed too; hopefully anybody with dnl a guile with readline support has a working guile-config or build-guile AC_MSG_CHECKING(for guile libraries) GUILE_LIBS="${GUILE_LIBS_PRE} `${GUILE_CONFIG} link`" GUILE_STATIC_LIBS="`${GUILE_CONFIG} info libdir`/libguile.a" GUILE_EXTRA_LIBS="${GUILE_LIBS_PRE} `${GUILE_CONFIG} link`" #this really should not have -lguile in it GUILE_INCLUDES="`${GUILE_CONFIG} compile`" AC_MSG_RESULT($GUILE_LIBS) SCWM_ARG_PATH(guile-include-prefix, [ --with-guile-include-prefix=DIR Expect guile header files to be installed in DIR [optional]], [ AC_MSG_CHECKING(where to expect guile header files) guile_include_prefix="${withval}" GUILE_INCLUDES="-I${guile_include_prefix}" AC_MSG_RESULT("${guile_include_prefix}") ]) AC_SUBST(GUILE_INCLUDES) AC_SUBST(GUILE_LIBS) AC_SUBST(GUILE_STATIC_LIBS) AC_SUBST(GUILE_EXTRA_LIBS) AM_CONDITIONAL(DL_SUPPORT, test "DL_SUPPORT" = true) dnl ## Checks for header files ## AC_STDC_HEADERS AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H, 1, [Define this if your system has a header file.])) AC_CHECK_HEADERS(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H, 1, [Define this if your system has a header file.])) AC_MSG_CHECKING(whether to enable viavoice) AC_ARG_ENABLE(viavoice, [ --enable-viavoice Enable the ViaVoice module],[ if test "yes" = "$enableval"; then if test -r /usr/lib/ViaVoice/include/smapi.h; then have_viavoice=true AC_DEFINE(HAVE_VIAVOICE, 1, [Define this if you have IBM ViaVoice installed with its smapi.h header]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(/usr/lib/ViaVoice/include/smapi.h was not found) fi else AC_MSG_RESULT(no) fi ],[ have_viavoice=false AC_MSG_RESULT(no) ]) AM_CONDITIONAL(HAVE_VIAVOICE, test x"true" = x$have_viavoice) dnl ## Check for library functions ## # AC_CHECK_FUNCS(select) AC_CHECK_FUNCS(getopt_long) AC_CHECK_FUNCS(gethostname waitpid sysconf uname) AC_CHECK_FUNCS(strerror strcasecmp strncasecmp) AC_CHECK_FUNCS(usleep) AC_CHECK_FUNCS(setlinebuf setvbuf) AC_CHECK_FUNCS(setenv) dnl # Check for recent guile funcs saved_LDFLAGS="$LDFLAGS" LDFLAGS="$GUILE_LIBS" dnl This checks (roughly) if the guile lib is a sufficiently recent snapshot dnl to have a scm_eval_string that is safe against re-entry by continuations. dnl I was to lazy to write a real test macro so I just check for a function dnl that was added soon after. dnl AC_CHECK_LIB(guile, scm_done_malloc, AC_DEFINE(HAVE_SAFE_SCM_EVAL_STRING), ,$GUILE_LIBS) dnl This checks if the new printer functions are available, and should dnl be used instead of the old ones. dnl AC_CHECK_LIB(guile, scm_puts, AC_DEFINE(HAVE_SCM_PUTS), ,$GUILE_LIBS) dnl This checks if we have a guile with readline support dnl AC_CHECK_LIB(guile, scm_readline, AC_DEFINE(HAVE_SCM_READLINE), ,$GUILE_LIBS) dnl AC_CHECK_LIB(guile, scm_parse_path, AC_DEFINE(HAVE_SCM_PARSE_PATH), ,$GUILE_LIBS) LDFLAGS="${saved_LDFLAGS}" dnl check for scm_the_last_fluid in place of scm_the_last_stack_var dnl saved_LIBS="${LIBS}" dnl LIBS="${LIBS} ${GUILE_LIBS}" dnl saved_CFLAGS="${CFLAGS}" dnl CFLAGS="${CFLAGS} ${GUILE_INCLUDES}" dnl AC_MSG_CHECKING(for scm_the_last_stack_fluid in -lguile) dnl AC_TRY_LINK([ dnl #include dnl ],[ dnl return scm_the_last_stack_fluid; dnl ], [ dnl AC_DEFINE(HAVE_SCM_THE_LAST_STACK_FLUID) dnl AC_MSG_RESULT(yes) dnl ],[ dnl AC_MSG_RESULT(no) dnl ]) dnl dnl LIBS="${saved_LIBS}" dnl CFLAGS="${saved_CFLAGS}" dnl ## Checks for typedefs, structures, and compiler characteristics. ## AC_C_CONST AC_C_INLINE dnl check for imlib AM_PATH_IMLIB if test ! "x" = x"$imlib_prefix"; then PREFIX_INCLUDES="$PREFIX_INCLUDES -I$imlib_prefix/include" fi AC_SUBST(PREFIX_INCLUDES) AC_ARG_ENABLE(imlib, [ --disable-imlib Do not use IMLIB library even if it exists], enable_imlib=no, enable_imlib=yes) if test x"$enable_imlib" = x"no"; then AC_MSG_RESULT(Not using imlib due to --disable-imlib option) elif test ! -z "$IMLIB_LIBS" ; then LIBS="$LIBS $IMLIB_LIBS" ## CFLAGS="$CFLAGS $IMLIB_CFLAGS" # this does not affect anything --07/01/99 gjb USE_IMLIB="true" AC_DEFINE(USE_IMLIB, 1, [Define this if you want to use imlib pixmap/bitmap support]) fi dnl ## Define directories ## scwm_load_path=${datadir}/${PACKAGE}/modules scwm_schemedir=${scwm_load_path}/app/scwm scwm_themedir=${datadir}/${PACKAGE}/themes scwm_bin_load_path=${libdir}/${PACKAGE}/modules scwm_moduledir=${scwm_bin_load_path}/app/scwm scwm_utildir=${libdir}/${PACKAGE}/util scwm_pixmapdir=${datadir}/${PACKAGE}/pixmaps scwm_viavoice_grammardir=${datadir}/${PACKAGE}/ViaVoice SCWM_ARG_PATH(scwmrcdir, [ --with-scwmrcdir=DIR Install configuration files in DIR [DATADIR/scwm/scwmrc]], [ AC_MSG_CHECKING(where configuration files should go; e.g., system.scwmrc) scwmrcdir="${withval}" AC_MSG_RESULT("${scwmrcdir}") ], [ scwmrcdir="${datadir}/${PACKAGE}/scwmrc" ]) SCWM_ARG_PATH(docdir, [ --with-docdir=DIR Install documentation files in DIR [DATADIR/doc/PACKAGE]], [ AC_MSG_CHECKING(where documentation files should go) scwm_docdir="${withval}" AC_MSG_RESULT("${scwm_docdir}") ], [ scwm_docdir="${datadir}/doc/${PACKAGE}" ]) SCWM_ARG_PATH(examplesdir, [ --with-examplesdir=DIR Install examples in DIR [${scwm_docdir}/examples]], [ AC_MSG_CHECKING(where examples should go) scwm_examplesdir="${withval}" AC_MSG_RESULT("${scwm_examplesdir}") ], [ scwm_examplesdir="${scwm_docdir}/examples" ]) # open the parentheses scwm_image_load_path="(\\\"${scwm_pixmapdir}\\\" "; for i in \ ${x_includes}/X11/bitmaps \ ${x_includes}/X11/pixmaps \ ${orig_x_libs}/X11/mini-icons \ ${includedir}/X11/pixmaps \ ${includedir}/X11/bitmaps \ ${libdir}/X11/mini-icons \ @prefix@/share/pixmaps \ @prefix@/share/icons \ @prefix@/share/icons/mini \ ; do if test -d $i; then # add the directory to the list as a string scwm_image_load_path="$scwm_image_load_path \\\"$i\\\"" fi done # close the parentheses scwm_image_load_path="${scwm_image_load_path})"; AC_SUBST(scwm_load_path) AC_SUBST(scwm_bin_load_path) AC_SUBST(scwm_schemedir) AC_SUBST(scwm_themedir) AC_SUBST(scwm_pixmapdir) AC_SUBST(scwm_moduledir) AC_SUBST(scwmrcdir) AC_SUBST(scwm_image_load_path) AC_SUBST(scwm_utildir) AC_SUBST(scwm_viavoice_grammardir) AC_SUBST(scwm_docdir) AC_SUBST(scwm_examplesdir) AC_SUBST(SCWM_MAJOR_VERSION) AC_SUBST(SCWM_MINOR_VERSION) AC_SUBST(SCWM_VERSION) dnl # Check for optional settings # AC_MSG_CHECKING(whether to enable multibyte support) AC_ARG_ENABLE(multibyte, [ --enable-multibyte Handle multibyte strings for window titles, etc], [ if test "yes" = "$enableval"; then AC_DEFINE(I18N, 1, [Define this if you want multibyte support.]) fi AC_MSG_RESULT($enableval); ], [ AC_MSG_RESULT(no); ]) I18N_LIB="" if test x"$enable_multibyte" = x"yes" ; then # check if system has xpg4 library ( for FreeBSD ) AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [ I18N_LIB="-lxpg4" ],[]) fi AC_SUBST(I18N_LIB) CPPEXTRAFLAGS="" AC_ARG_ENABLE(warnings, [ --enable-warnings Turn on most compiler warnings (may require gcc)] ,[if test "yes" = "$enableval"; then CPPEXTRAFLAGS="-Wall -W -Wno-sign-compare" fi ]) AC_SUBST(CPPEXTRAFLAGS) AC_OUTPUT([Makefile \ scwm.spec \ ANNOUNCE \ README \ sample.scwmrc/Makefile \ src/Makefile \ src/scwm-doc-snarf \ src/scwm-versiondat.h \ scheme/Makefile \ pixmaps/Makefile \ app/Makefile \ modules/Makefile \ modules/background/Makefile \ modules/c-animation/Makefile \ modules/esdsound/Makefile \ modules/overlay-plane/Makefile \ modules/pie-menus/Makefile \ modules/xlib-drawing/Makefile \ modules/xpm-menus/Makefile \ modules/proplist/Makefile \ modules/xtest/Makefile \ modules/scwmgtkhelper/Makefile \ utilities/Makefile \ utilities/libscwmexec/Makefile \ utilities/scwmexec/Makefile \ utilities/scwmrepl/Makefile \ utilities/pidproperty/Makefile \ utilities/run-renamed/Makefile \ utilities/dev/Makefile \ utilities/emacs/Makefile \ utilities/misc/Makefile \ doc/Makefile \ themes/Makefile \ utilities/dev/scwmdoc \ utilities/dev/scwmdoc.scm \ utilities/dev/scwm-usage-counter \ utilities/dev/X-error-describe \ utilities/dev/create-dependency-dot-graph \ ],[chmod +x src/scwm-doc-snarf ] \ ) ## modules/scwmgtkhelper/Makefile ## modules/corba/Makefile ## modules/viavoice/Makefile \