--- chemtool-1.5/configure.in 2002-04-11 14:40:46.000000000 -0500 +++ chemtool-1.5-gentoo/configure.in 2002-11-12 18:39:20.000000000 -0500 @@ -47,6 +47,7 @@ kdedir=$withval, [kdedir=/opt/kde]) AC_MSG_CHECKING([for KDE ]) +if test "x$kdedir" != "xno" ; then if test -d $kdedir/share/mimelnk ; then kdemimedir=$kdedir AC_MSG_RESULT([apparently in $kdemimedir]) @@ -57,8 +58,11 @@ kdemimedir=$KDEMIMEDIR fi fi +fi if test "x$kdemimedir" = "x" ; then AC_MSG_RESULT([no]) +else + usekde="yes" fi dnl AC_DEFINE_UNQUOTED(KDEDIR=$withval), dnl [AC_DEFINE_UNQUOTED(KDEDIR="\"\/opt/kde"\")]) @@ -70,6 +74,7 @@ gnomedir=$withval, [gnomedir=/usr]) AC_MSG_CHECKING([for GNOME ]) +if test "x$gnomedir" != "xno" ; then if test -d $gnomedir/share/mime-info ; then gnomemimedir=$gnomedir AC_MSG_RESULT([apparently in $gnomemimedir]) @@ -80,24 +85,28 @@ gnomemimedir=$GNOMEMIMEDIR fi fi -if test "x$GNOMEMIMEDIR" = "x" ; then +fi +if test "x$gnomemimedir" = "x" ; then AC_MSG_RESULT([no]) +else + usegnome="yes" fi dnl AC_DEFINE_UNQUOTED(GNOMEMIMEDIR=$withval), dnl [AC_DEFINE_UNQUOTED(GNOMEMIMEDIR="\"\/usr"\")]) dnl " AC_MSG_CHECKING(whether to enable locales) -dnl AC_ARG_ENABLE(locales, -dnl [ --enable-locales Use locales [no]],,enable_locales=no) -dnl if test x$enable_locales = xyes; then -if test "$ac_cv_header_libintl_h" = "yes" +AC_ARG_ENABLE(locales, +[ --enable-locales Use locales [no]],,enable_locales=no) +if test x$enable_locales = "xyes" ; +dnl if test "$ac_cv_header_libintl_h" = "yes" then - AC_MSG_RESULT(yes) - AC_DEFINE_UNQUOTED(LOCALEDIR="\"\$datadir/locale"\") -else + AC_MSG_RESULT(yes) + AC_DEFINE_UNQUOTED(LOCALEDIR, "$datadir/locale") + uselocales="yes" +else AC_MSG_RESULT(no) - AC_DEFINE(DISABLE_NLS) + AC_DEFINE(DISABLE_NLS) fi AC_MSG_CHECKING(whether to enable libundo) @@ -121,7 +130,10 @@ fi AC_SUBST(localedir) +AC_SUBST(uselocales) AC_SUBST(kdemimedir) +AC_SUBST(usekde) AC_SUBST(gnomemimedir) +AC_SUBST(usegnome) AC_OUTPUT(Makefile src-cht/Makefile)