dnl aclocal.m4 generated automatically by aclocal 1.4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # serial 40 AC_PROG_LIBTOOL AC_DEFUN(AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # Save cache, so that ltconfig can load it AC_CACHE_SAVE # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig AC_CACHE_LOAD # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log ]) AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], [libtool_flags="$libtool_flags --enable-dlopen"]) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [libtool_flags="$libtool_flags --enable-win32-dll"]) AC_ARG_ENABLE(libtool-lock, [ --disable-libtool-lock avoid locking (might break parallel builds)]) test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac ]) # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_SHARED, [dnl define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_STATIC, [dnl define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. changequote(,)dnl [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' changequote([,])dnl # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_SUBST(LD) AC_PROG_LD_GNU ]) AC_DEFUN(AC_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case "$host" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library, adds --enable-ltdl-convenience to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library, and adds --enable-ltdl-install to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" INCLTDL= fi ]) dnl old names AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl dnl This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL])dnl # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 5 AC_DEFUN(AM_GTK_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) USE_INCLUDED_LIBINTL=no dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then # AC_DEFINE(ENABLE_NLS) # AC_MSG_CHECKING([whether included gettext is requested]) # AC_ARG_WITH(included-gettext, # [ --with-included-gettext use the GNU gettext library included here], # nls_cv_force_use_gnu_gettext=$withval, # nls_cv_force_use_gnu_gettext=no) # AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_force_use_gnu_gettext="no" nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. dnl catgets is only used if permitted by option --with-catgets. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([#include ], [return (int) dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)]) if test "$gt_cv_func_dgettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CACHE_CHECK([for dgettext in libintl], gt_cv_func_dgettext_libintl, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes, gt_cv_func_dgettext_libintl=no)], gt_cv_func_dgettext_libintl=no)]) fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then LIBS="$LIBS -lintl"; fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) INSTOBJEXT=.mo fi fi # Added by Martin Baulig 12/15/98 for libc5 systems if test "$gt_cv_func_dgettext_libc" != "yes" \ && test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS=-lintl LIBS=`echo $LIBS | sed -e 's/-lintl//'` fi ]) if test "$CATOBJEXT" = "NONE"; then AC_MSG_CHECKING([whether catgets can be used]) AC_ARG_WITH(catgets, [ --with-catgets use catgets functions if available], nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) AC_MSG_RESULT($nls_cv_use_catgets) if test "$nls_cv_use_catgets" = "yes"; then dnl No gettext in C library. Try catgets next. AC_CHECK_LIB(i, main) AC_CHECK_FUNC(catgets, [AC_DEFINE(HAVE_CATGETS) INTLOBJS="\$(CATOBJS)" AC_PATH_PROG(GENCAT, gencat, no)dnl # if test "$GENCAT" != "no"; then # AC_PATH_PROG(GMSGFMT, gmsgfmt, no) # if test "$GMSGFMT" = "no"; then # AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) # fi # AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) # USE_INCLUDED_LIBINTL=yes # CATOBJEXT=.cat # INSTOBJEXT=.cat # DATADIRNAME=lib # INTLDEPS='$(top_builddir)/intl/libintl.a' # INTLLIBS=$INTLDEPS # LIBS=`echo $LIBS | sed -e 's/-lintl//'` # nls_cv_header_intl=intl/libintl.h # nls_cv_header_libgt=intl/libgettext.h # fi ]) fi fi if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" != "yes"; then AC_DEFINE(ENABLE_NLS) else # Unset this variable since we use the non-zero value as a flag. CATOBJEXT= # dnl Mark actions used to generate GNU NLS library. # INTLOBJS="\$(GETTOBJS)" # AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) # AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) # AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) # AC_SUBST(MSGFMT) # USE_INCLUDED_LIBINTL=yes # CATOBJEXT=.gmo # INSTOBJEXT=.mo # DATADIRNAME=share # INTLDEPS='$(top_builddir)/intl/libintl.a' # INTLLIBS=$INTLDEPS # LIBS=`echo $LIBS | sed -e 's/-lintl//'` # nls_cv_header_intl=intl/libintl.h # nls_cv_header_libgt=intl/libgettext.h fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) # # If this is used in GNU gettext we have to set USE_NLS to `yes' # # because some of the sources are only built for this goal. # if test "$PACKAGE" = gettext; then # USE_NLS=yes # USE_INCLUDED_LIBINTL=yes # fi dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(AM_GTK_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ strdup __argz_count __argz_stringify __argz_next]) if test "${ac_cv_func_stpcpy+set}" != "set"; then AC_CHECK_FUNCS(stpcpy) fi if test "${ac_cv_func_stpcpy}" = "yes"; then AC_DEFINE(HAVE_STPCPY) fi AM_LC_MESSAGES AM_GTK_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl The reference to in the installed file dnl must be resolved because we cannot expect the users of this dnl to define HAVE_LOCALE_H. if test $ac_cv_header_locale_h = yes; then INCLUDE_LOCALE_H="#include " else INCLUDE_LOCALE_H="\ /* The system does not provide the header . Take care yourself. */" fi AC_SUBST(INCLUDE_LOCALE_H) dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux libc-5 and the normal X/Open format test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi dnl po2tbl.sed is always needed. sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed dnl In the intl/Makefile.in we have a special dependency which makes dnl only sense for gettext. We comment this out for non-gettext dnl packages. if test "$PACKAGE" = "gettext"; then GT_NO="#NO#" GT_YES= else GT_NO= GT_YES="#YES#" fi AC_SUBST(GT_NO) AC_SUBST(GT_YES) dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl *** For now the libtool support in intl/Makefile is not for real. l= AC_SUBST(l) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # Search path for a program which passes the given test. # Ulrich Drepper , 1996. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN(AM_PATH_PROG_WITH_TEST, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test -n "[$]$1"; then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # Check whether LC_MESSAGES is available in . # Ulrich Drepper , 1995. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 AC_DEFUN(AM_LC_MESSAGES, [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES) fi fi]) # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # Configure paths for GTK+ # Owen Taylor 97-11-3 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl AC_DEFUN(AM_PATH_GTK, [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) dnl path_dps.m4 --- test for dps client libraries/headers dnl Copyright (C) 1998 GYVE Development Team dnl dnl Author: Masatake YAMATO (masata-y@is.aist-nara.ac.jp) dnl dnl Tested by: Hideki Fujimoto (hideki70@osk2.3web.ne.jp) on Linux. dnl Shin-ichi Okada (s-okada@ksd.co.jp) on DGS-Debian. dnl Yasuhiro Shirasaki (yasuhiro@awa.tohoku.ac.jp) on OSF1. dnl Masatake YAMATO (masata-y@is.aist-nara.ac.jp) on Solaris2, OSF1 dnl dnl dnl Created: Sat Jan 17 14:27:37 1998 dnl Time-stamp: <98/02/04 20:04:27 masata-y> dnl dnl path_dps.m4 Version: 10 dnl dnl This file is a spinoff of the GYVE vector based drawing editor. 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, or (at your option) dnl 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., 675 Mass Ave, Cambridge, MA 02139, USA. dnl dnl As a special exception, the Free Software Foundation gives unlimited dnl permission to copy, distribute and modify the configure scripts that dnl are the output of Autoconf. You need not follow the terms of the GNU dnl General Public License when using or distributing such scripts, even dnl though portions of the text of Autoconf appear in them. The GNU dnl General Public License (GPL) does govern all other use of the material dnl that constitutes the Autoconf program. dnl dnl Certain portions of the Autoconf source text are designed to be copied dnl (in certain cases, depending on the input) into the output of dnl Autoconf. We call these the "data" portions. The rest of the Autoconf dnl source text consists of comments plus executable code that decides which dnl of the data portions to output in any given case. We call these dnl comments and executable code the "non-data" portions. Autoconf never dnl copies any of the non-data portions into its output. dnl dnl This special exception to the GPL applies to versions of Autoconf dnl released by the Free Software Foundation. When you make and dnl distribute a modified version of Autoconf, you may extend this special dnl exception to the GPL to apply to your modified version as well, *unless* dnl your modified version has the potential to copy into its output some dnl of the text that was the non-data portion of the version that you started dnl with. (In other words, unless your change moves or copies text from dnl the non-data portions to the data portions.) If your modification has dnl such potential, you must delete any notice of this special exception dnl to the GPL from your modified version. dnl dnl ---------------------------------------------------------------- dnl * Description * dnl ---------------------------------------------------------------- dnl This file contains three m4 macros, AC_PATH_DPS, AC_CHECK_DPS_NXAGENT dnl AC_PATH_DPSET, AC_PROG_PSWRAP. dnl dnl AC_PATH_DPS finds paths for the DPS client libraries and headers. dnl AC_CHECK_DPS_NXAGENT checks a dps nxagent is available or not. dnl AC_APTH_DPSET invokes above two macros. Additionally this macro dnl defines some variables. AC_PROG_PSWRAP checks a existence of dnl pswrap translator. dnl dnl dnl 1. AC_PATH_DPS sets three shell variables, no_dps, dps_includes and dnl dps_libraries. dnl dnl * no_dps dnl NULL string or "yes" is set. "yes" is set when AC_PATH_DPS cannot find dnl the path for the DPS releated files or when "no" is specified as the dnl argument for the option --with-dps of configure script. If AC_PATH_DPS dnl can find the path, NULL string is set. dnl dnl * dps_includes dnl The path for headers of dps client libraries is set to this variable. dnl If --with-dps-includes=DIR are given as the flag for configure script, dnl DIR is set to the variable. dnl The value does not make sense when the value of no_dps is "yes". dnl Pass the value to the C compiler through CPPFLAGS in your configure.in dnl and you can include DPS header files in your files. dnl dnl NOTE: Strictly the DPS headers are in $dps_includes/DPS. dnl So you need to write cpp include directives like: dnl #include dnl dnl Don't write like: dnl #include dnl dnl * dps_libraries dnl The path for dps client libraries is set to this variable. dnl If --with-dps-libraries=DIR are given as the flag for configure script, dnl DIR is set to the variable. dnl The value does not make sense when the value of no_dps is "yes". dnl Pass the value to the C compiler(or the linker) through LIBS in your dnl configure.in and you can link the libdps.a, the DPS client libdps with dnl your program. dnl e.g. dnl LIBS="-L$dps_libraries -ldps -$LIBS" dnl NOTE: Don't forget to add the flags for X libraries to LIBS, too. dnl dnl dnl 2. AC_CHECK_DPS_NXAGENT checks the existence of the header file dnl and the function XDPSNXSetClientArg using AC_CHECK_HEADERS and AC_CHECK_FUNCS. dnl So this macro defines HAVE_DPS_DPSNXARGS_H and HAVE_XDPSNXSETCLIENTARG that can dnl be be referred from source files of your program if the header and function are dnl existing. dnl For configure.in programmer, this macros defines three shell dnl variables, no_dps_nxagent_header and no_dps_nxagent_func and no_dps_nxagent. dnl dnl * no_dps_nxagent_header dnl NULL string or yes is set. yes is set if the header file is not existing. dnl dnl * no_dps_nxagent_func dnl NULL string or yes is set. yes is set if the function is not existing. dnl dnl * no_dps_nxagent dnl NULL string or yes is set. yet is set if yet is set to no_dps_nxagent_header nor dnl no_dps_nxagent_func. dnl dnl dnl 3. AC_PATH_DPSET is extended version of AC_PATH_DPS and AC_CHECK_DPS_NXAGENT. dnl AC_PATH_DPSET sets no_dps, dps_includes, dps_libraries no_dps_nxagent_header, dnl no_dps_nxagent_func and no_dps_nxagent which are explained dnl above. Additionally it sets DPS_CFLAGS, DPS_LIBS when no_dps is set to a NULL dnl string like: dnl DPS_CFLAGS=-I${dps_includes} dnl DPS_LIBS="-L${dps_libraries} -ldpstk -ldps -lpsres" dnl It also defines HAVE_DPS_NXAGENT that will be passed to the C compiler if dnl NULL string is set to no_dps_nxagent. dnl dnl Use AC_PATH_DPSET in your configure.in and C source files like this: dnl --- configure.in --- dnl AC_PATH_XTRA dnl AC_PATH_DPSET dnl if test "x$no_dps" = xyes ; then dnl AC_MSG_ERROR(Could not find the dps client library: see config.log) dnl fi dnl CPPFLAGS="$CPPFLAGS $DPS_CFLAGS $X_CFLAGS" dnl LIBS="$LIBS $DPS_LIBS $X_PRE_LIBS $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS" dnl --- C source file --- dnl #ifdef HAVE_DPX_NXAGENT dnl #include dnl #endif dnl ... dnl #if HAVE_DPX_NXAGENT dnl fprintf(stderr, "Does X server supports DPS extension..."); dnl XDPSNXSetClientArg(XDPSNX_AUTO_LAUNCH, (void *)True); dnl #endif dnl ... dnl --- end --- dnl dnl 4. AC_PROG_PSWRAP checks the existence of the command `pswrap'. dnl pswrap is also part of DPS client library. dnl If the command exists, AC_PROG_PSWRAP set PSWRAP to "pswrap". dnl Otherwise AC_PROG_PSWRAP set PSWRAP to "", an empty string. dnl dnl dnl 5. How to mix this file with your package dnl You need to include path_dps.m4 in your package. dnl * If you use automake and if you didn't install path_dps.m4 dnl [1] Create a file named acinclude.m4 at the root directory of your package. dnl [2] Put follwoing codes in the acinclude.m4 dnl include(path_dps.m4) dnl [3] Add path_dps.m4 to EXTRA_DIST in the Makefile.am at the directory . dnl [4] Invoke the follwoing commands at the directory: dnl automake; aclocal -I .; autoconf dnl dnl * If you use automake and if you installed path_dps.m4 dnl [1] automake; autoconf dnl dnl * If you use autoconf only: dnl Use aclocal.m4. Read the info of autoconf. I tested path_dps.m4 only with dnl automake. dnl dnl 6. TODO dnl * English, checking libdpstk.a, libpsres.a dnl ---------------------------------------------------------------- dnl * private AC_PATH_DPS_GUESS_GNUSTEP(HEADER_or_LIBRARY) dnl dnl Guessing the path by the GNUSTEP_SYSTEM_ROOT environment variable. dnl If the user install dgs using GNUstep make pacakge, the the client dnl libraries and headers may be installed at the somewhere under the dnl $GNUSTEP_SYSTEM_ROOT. dnl dnl This macro takes one argument, HEADER_or_LIBRARY. dnl dnl If HEADER_or_LIBRARY is "HEADER", this macro guesses dnl dps headers directory path and set dps_includes_candidates_gstep. dnl Else this macro guesses dps libraries directory path and dnl set dps_libraries_candidates_gstep. dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPS_GUESS_GNUSTEP, [dps_arch=${GNUSTEP_HOST_CPU} dps_os=${GNUSTEP_HOST_OS} dps_combo=${LIBRARY_COMBO} # if test x$1 = "xHEADER" ; then dps_includes_candidates_gstep="${GNUSTEP_SYSTEM_ROOT}/Headers ${GNUSTEP_SYSTEM_ROOT}/Headers/${dps_arch}/${dps_os}" else if test x$dps_combo = "x"; then dps_libraries_candidates_gstep=${GNUSTEP_SYSTEM_ROOT}/Libraries/${dps_arch}/${dps_os} elif test -r "${GNUSTEP_SYSTEM_ROOT}/Libraries/${dps_arch}/${dps_os}/libdps.a"; then dps_libraries_candidates_gstep=${GNUSTEP_SYSTEM_ROOT}/Libraries/${dps_arch}/${dps_os} elif test -r "${GNUSTEP_SYSTEM_ROOT}/Libraries/${dps_arch}/${dps_os}/libdps.so"; then dps_libraries_candidates_gstep=${GNUSTEP_SYSTEM_ROOT}/Libraries/${dps_arch}/${dps_os} else dps_libraries_candidates_gstep=${GNUSTEP_SYSTEM_ROOT}/Libraries/${dps_arch}/${dps_os}/${dps_combo} fi fi no_dps= ]) dnl ---------------------------------------------------------------- dnl * private AC_PATH_DPS_GUESS(HEADER_or_LIBRARY) dnl dnl Guessing the dps headers and libraries paths. dnl dnl This macro takes one argument, HEADER_or_LIBRARY. dnl dnl If HEADER_or_LIBRARY is "HEADER", this macro guesses dnl dps headers directory path and set dps_includes_candidates. dnl Else this macro guesses dps libraries directory path and dnl set dps_libraries_candidates. dnl dnl The paths in dps_includes_candidates_default and dps_libraries_candidates_default dnl are candidates for all platforms. dnl dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPS_GUESS, [dnl dnl dnl dps_includes_candidates_default="/usr/local/include $ac_x_includes" dps_libraries_candidates_default="/usr/local/lib $ac_x_libraries" if test "x${DGS_CONFIG}" != "x" ; then dps_includes_candidates_default="`${DGS_CONFIG} --prefix`/include ${dps_includes_candidates_default}" dps_libraries_candidates_default="`${DGS_CONFIG} --exec-prefix`/lib ${dps_libraries_candidates_default}" fi dnl dnl dnl if test "x$1" = xHEADER ; then dps_includes_candidates=$dps_includes_candidates_default else dps_libraries_candidates=$dps_libraries_candidates_default fi dnl dnl Add GNUSTEP directories dnl if test x${GNUSTEP_SYSTEM_ROOT} != "x"; then if test "x$1" = xHEADER ; then AC_PATH_DPS_GUESS_GNUSTEP(HEADER) dps_includes_candidates="$dps_includes_candidates_gstep $dps_includes_candidates" else AC_PATH_DPS_GUESS_GNUSTEP(LIBRARY) dps_libraries_candidates="$dps_libraries_candidates_gstep $dps_libraries_candidates" fi fi dnl dnl dnl case "$target" in dnl ( # Solaris2 has DPS. # Including openwin headers directory if the OS is Solaris-2.x that has DPS. # *-*-solaris2*) if test x$OPENWINHOME = "x"; then AC_MSG_WARN(Set OPENWINHOME environment variable.) solaris_dps_root=/usr/openwin else solaris_dps_root=${OPENWINHOME} fi if test "x$1" = xHEADER ; then dps_includes_candidates="$solaris_dps_root/include/X11 $dps_includes_candidates" else dps_libraries_candidates="$solaris_dps_root/lib $dps_libraries_candidates" fi ;; dnl ( # OSF/DigitalUNIX(?) also has DPS. # *-*-osf*) osf_dps_root=/usr if test "x$1" = xHEADER ; then dps_includes_candidates="$osf_dps_root/include $dps_includes_candidates" else dps_libraries_candidates="$osf_dps_root/shlib $osf_dps_root/lib $dps_libraries_candidates" fi ;; dnl ( # AIX also has DPS but we don't have AIX box so, we don't test this macro on # that platform. If this works file, pls report the author # (masata-y@is.aist-nara.ac.jp). # dnl The AIX related information provided by s-okada. dnl dnl AIX 3.2.5 dnl /usr/lpp/DPS/bin dnl /usr/lpp/DPS/lib dnl /usr/include/DPS dnl dnl About AIX 4.1(Japanese) dnl http://www.ibm.co.jp/manuals/gc23-3902-02/d3b63114-2.html dnl *-*-aix*) if test "x$1" = xHEADER ; then dps_includes_candidates="/usr/include $dps_includes_candidates" else dps_libraries_candidates="/usr/lpp/DPS $dps_libraries_candidates" fi ;; esac]) dnl ---------------------------------------------------------------- dnl * private AC_PATH_DPS_CHECK_LIB dnl Checking the existence of libdps.a dnl If existing, set null string to no_dps. dnl If not existing, set yes to no_dps. dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPS_CHECK_LIB, [if test "x$no_dps" = xyes; then dnl DO nothing echo -n "" elif test "x$no_x" = xyes ; then no_dps=yes elif test "x${x_libraries}" != x ; then dps_check_lib_save_libs=$LIBS if test "x${dps_libraries}" = x ; then for candidate_path in $dps_libraries_candidates do LIBS="-ldps -L${candidate_path} -L${x_libraries} -lX11 -lm" AC_TRY_LINK(, [XDPSCreateSimpleContext()], no_dps=, no_dps=yes) # Really Found? if test "x$no_dps" = x ; then if test -f ${candidate_path}/libdps.so ; then # Do nothing cd . elif test -f ${candidate_path}/libdps.a ; then # Do nothing cd . else no_dps=yes fi fi if test "x$no_dps" = x ; then if test "x${dps_libraries}" = x ; then dps_libraries=$candidate_path break fi fi done if test "x${dps_libraries}" != x ; then no_dps= fi else LIBS="-ldps -L${dps_libraries} -L${x_libraries} -lX11 -lm $LIBS" AC_TRY_LINK(, [XDPSCreateSimpleContext()], , no_dps=yes) fi LIBS=$dps_check_lib_save_libs else # We can compile using X headers with no special include directory. if test "x${dps_libraries}" = x ; then for candidate_path in $dps_libraries_candidates do dps_check_lib_save_libs=$LIBS LIBS="-ldps -L${candidate_path} -lX11 -lm $LIBS" AC_TRY_LINK(, [XDPSCreateSimpleContext()], , no_dps=yes) if test "x$no_dps" = x ; then if test "x${dps_libraries}" = x ; then dps_libraries=$candidate_path fi fi LIBS=$dps_check_lib_save_libs done if test "x${dps_libraries}" != x ; then no_dps= fi else dps_check_lib_save_libs=$LIBS LIBS="-ldps -L${dps_libraries} -lX11 -lm $LIBS" AC_TRY_LINK(, [XDPSCreateSimpleContext()], , no_dps=yes) LIBS=$dps_check_lib_save_libs fi fi]) dnl ---------------------------------------------------------------- dnl * private AC_PATH_DPS_CHECK_HEADER dnl Checking the existence of DPS/*.h dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPS_CHECK_HEADER, [AC_REQUIRE_CPP() if test "x$no_dps" = xyes ; then dnl DO nothing echo -n "" else if test "x${dps_includes}" = x ; then for candidate_path in $dps_includes_candidates do dps_check_lib_save_headers=$CPPFLAGS CPPFLAGS="-I${candidate_path} $CPPFLAGS" AC_TRY_CPP([#include ], no_dps=, no_dps=yes) if test "x$no_dps" = x ; then if test -f ${candidate_path}/DPS/dpsfriends.h ; then dps_includes=$candidate_path CPPFLAGS=$dps_check_lib_save_headers break fi fi CPPFLAGS=$dps_check_lib_save_headers done if test "x${dps_includes}" != x ; then no_dps= fi else dps_check_lib_save_headers=$CPPFLAGS CPPFLAGS="-I${dps_includes} $CPPFLAGS" AC_TRY_CPP([#include ], no_dps=, no_dps=yes) CPPFLAGS=$dps_check_lib_save_headers fi fi]) dnl ---------------------------------------------------------------- dnl * private AC_PATH_DPS_CHECK dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPS_CHECK, [AC_PATH_DPS_CHECK_LIB if test "x$no_dps" != xyes ; then AC_PATH_DPS_CHECK_HEADER fi]) dnl ---------------------------------------------------------------- dnl * public AC_PATH_DPS dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPS, [dnl AC_REQUIRE([AC_PATH_X]) AC_MSG_CHECKING(for DPS) dnl ------------------------------- Initialize variables dps_includes=NONE dps_libraries=NONE dnl ------------------------------- Option arguments AC_ARG_WITH(dps, [ --with-dps use the DPS. Give yes or no. [yes]], , with_dps=yes) AC_ARG_WITH(dps_includes, [ --with-dps-includes=DIR DPS include files are in DIR/DPS], , with_dps_includes=NONE) AC_ARG_WITH(dps_libraries, [ --with-dps-libraries=DIR DPS libraries files are in DIR], , with_dps_libraries=NONE) dnl ------------------------------- Check the arguments for configure dnl ------------------------------- And decide dps_includes&dps_libraries. if test "x$with_dps" = xno; then no_dps=yes else if test "x$dps_includes" != xNONE && test "x$dps_libraries" != xNONE; then no_dps= else AC_CACHE_VAL(ac_cv_path_dps, [dnl ---------------------------- Set defalut value no_dps=yes AC_CHECK_PROG(DGS_CONFIG, dgs-config, dgs-config, "") if test "x$with_dps_includes" = xNONE ; then dps_includes="" no_dps= AC_PATH_DPS_GUESS(HEADER) else no_dps= dps_includes=$with_dps_includes fi if test "x$with_dps_libraries" = xNONE ; then dps_libraries="" no_dps= AC_PATH_DPS_GUESS(LIBRARY) else no_dps= dps_libraries=$with_dps_libraries fi dnl ------------------------------- Test AC_PATH_DPS_CHECK dnl ------------------------------- Generate value for caching if test "x$no_dps" = xyes; then ac_cv_path_dps="no_dps=yes" else ac_cv_path_dps="no_dps= ac_dps_includes=$ac_dps_includes ac_dps_libraries=$ac_dps_libraries" fi]) dnl ------------------------------- Eval cache value fi eval "$ac_cv_path_dps" dnl ------------------------------- Report the result if test "x$no_dps" = xyes; then AC_MSG_RESULT(no) else test "x$dps_includes" = xNONE && dps_includes=$ac_dps_includes test "x$dps_libraries" = xNONE && dps_libraries=$ac_dps_libraries ac_cv_path_dps="no_dps= ac_dps_includes=$dps_includes ac_dps_libraries=$dps_libraries" AC_MSG_RESULT([libraries $dps_libraries, headers $dps_includes]) fi fi]) dnl ---------------------------------------------------------------- dnl * public AC_CHECK_DPS_NXAGENT dnl ---------------------------------------------------------------- AC_DEFUN(AC_CHECK_DPS_NXAGENT, [AC_REQUIRE([AC_PATH_DPS]) if test "x$no_dps" = xyes ; then dnl Do nothing echo -n "" else dps_check_lib_save_headers=$CPPFLAGS CPPFLAGS="-I${dps_includes} $CPPFLAGS" AC_CHECK_HEADERS(DPS/dpsNXargs.h, no_dps_nxagent_header=, no_dps_nxagent_header=yes) CPPFLAGS=$dps_check_lib_save_headers dps_check_lib_save_libs=$LIBS if test "x${x_libraries}" != x; then LIBS="-ldpstk -ldps -lpsres -L${dps_libraries} -L${x_libraries} -lX11 -lm $LIBS" else LIBS="-ldpstk -ldps -lpsres -L${dps_libraries} -lX11 -lm $LIBS" fi AC_CHECK_FUNCS(XDPSNXSetClientArg, no_dps_nxagent_func=,no_dps_nxagent_func=yes) LIBS=$dps_check_lib_save_libs AC_MSG_CHECKING(for DPS NXAGENT) if test "x$no_dps_nxagent_header" != xyes && test "x$no_dps_nxagent_func" != xyes ; then no_dps_nxagent= AC_MSG_RESULT(yes) else no_dps_nxagent=yes AC_MSG_RESULT(no) fi fi]) dnl ---------------------------------------------------------------- dnl * public AC_PATH_DPSET dnl ---------------------------------------------------------------- AC_DEFUN(AC_PATH_DPSET, [AC_REQUIRE([AC_PATH_DPS]) AC_REQUIRE([AC_CHECK_DPS_NXAGENT]) if test "x$no_dps" = xyes ; then dnl Do nothing echo -n "" else if test "x$no_dps_nxagent" != xyes ; then AC_DEFINE(HAVE_DPS_NXAGENT) fi DPS_CFLAGS=-I${dps_includes} DPS_LIBS="-L${dps_libraries} -ldpstk -ldps -lpsres" fi ]) dnl ---------------------------------------------------------------- dnl * public AC_PROG_PSWRAP dnl Set output variable `PSWRAP' to `pswrap' if `pswrap' is found, dnl otherwise to `' (Empty). dnl ---------------------------------------------------------------- AC_DEFUN(AC_PROG_PSWRAP, [AC_CHECK_PROG(PSWRAP, pswrap, pswrap, "")]) dnl ---------------------------------------------------------------- dnl About DPS server and DPS client library. dnl ---------------------------------------------------------------- dnl dnl [0] Solaris2, AIX and OSF1 have them. Lucky you! dnl dnl [1] HPUX and IRIX have the DPS extension on its X server dnl but I cannot find the client side files for DPS. dnl I found libdps.so in /usr/lib on IRIX. But I cannot find header dnl files. dnl You should have to install DPS client library by your self. dnl The client library is provided by ADOBE. I don't know well about dnl it. dnl dnl [/X11R5/contrib/lib/DPS/include/DPS] dnl [/X11R6/contrib/lib/DPS/include/DPS] dnl dnl [2] etc... You can check the existence of DPS library by follwing shell dnl command line. dnl % which pswrap dnl If the command tells the path for pswrap command, the system you are dnl using has DPS client library. dnl dnl [3] *BSD, Linux are waitting for the free DPS server implementation dnl named DGS. DGS will be part of gs5.50. Wait! dnl dnl [4] NeXT/Apple/Rapsody? dnl I don't know well about it. dnl dnl Snapshot of the DGS is already released. It is named dgs-5.20. dnl dnl The directory structcture of dgs-5.20 is reported by s-okada. dnl I've referred this report to write macros in this file. dnl dnl Thu Nov 12 11:32:30 1998: The implementation of DPS in gs5.50 is not dnl completed yet...sigh. dnl dnl