AC_INIT(etc/configuration.xml.in) PACKAGE=helm_configuration HELM_MAJOR_VERSION=0 HELM_MINOR_VERSION=0 HELM_MICRO_VERSION=2 HELM_VERSION=$HELM_MAJOR_VERSION.$HELM_MINOR_VERSION.$HELM_MICRO_VERSION VERSION=$HELM_VERSION DEFAULT_HELM_VAR_DIR=/var/local/helm DEFAULT_HELM_TMP_DIR=/tmp AC_ARG_ENABLE( defaults, [ --enable-defaults[=ARG] if yes then use defaults (don't ask user) [default=auto]], USE_DEFAULTS=$enableval, USE_DEFAULTS=auto ) if test "x$prefix" != xNONE; then RESOLVED_PREFIX=$prefix else RESOLVED_PREFIX=$ac_default_prefix fi if test "x$exec_prefix" != xNONE; then RESOLVED_EXEC_PREFIX=$exec_prefix else RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX fi dnl General HELM_BIN_DIR=$RESOLVED_EXEC_PREFIX/bin HELM_LIB_DIR=$RESOLVED_EXEC_PREFIX/lib/helm HELM_ETC_DIR=$RESOLVED_PREFIX/etc/helm HELM_SHARE_DIR=$RESOLVED_PREFIX/share/helm dnl Checking for the variable directory if test $USE_DEFAULTS != yes; then echo echo "Now you have to choose a suitable directory for variable files." echo "Normally, this directory would be something like /var/local/helm, you" echo "have to be sure that the directory (and the subdirectories in it)" echo "is world-writable." echo echo -n "[[$DEFAULT_HELM_VAR_DIR]] ? " read HELM_VAR_DIR echo if test x$HELM_VAR_DIR = x; then HELM_VAR_DIR="/var/local/helm" fi else HELM_VAR_DIR=$DEFAULT_HELM_VAR_DIR fi AC_MSG_CHECKING(for HELM variable dir) AC_MSG_RESULT($HELM_VAR_DIR) dnl Checking for the /tmp directory DEFAULTS=$USE_DEFAULTS if test $DEFAULTS = auto; then if test -d $DEFAULT_HELM_TMP_DIR ; then HELM_TMP_DIR=$DEFAULT_HELM_TMP_DIR else DEFAULTS=no fi fi if test $DEFAULTS = no; then echo echo "Please, tell me the name of a directory which can be used to store" echo "temporary files (normally it is something like /tmp)" echo echo -n "[[$DEFAULT_HELM_TMP_DIR]]" read HELM_TMP_DIR echo if test x$HELM_TMP_DIR = x; then HELM_TMP_DIR=$DEFAULT_HELM_TMP_DIR fi else HELM_TMP_DIR=$DEFAULT_HELM_TMP_DIR fi AC_MSG_CHECKING(for $HELM_TMP_DIR) if test ! -d $HELM_TMP_DIR; then AC_MSG_RESULT(no) AC_MSG_ERROR(please check your installation) fi AC_MSG_RESULT(ok) dnl Checks for GtkMathView AC_CHECK_PROG(HAVE_GTKMATHVIEW_CONFIG, gtkmathview-config, yes, no) if test $HAVE_GTKMATHVIEW_CONFIG = no; then AC_MSG_ERROR(Could not find gtkmathview-config) fi GTKMATHVIEW_PREFIX=`gtkmathview-config --prefix` AC_CACHE_CHECK( for dictionary.xml, helm_cv_GTKMATHVIEW_DICTIONARY_PATH, helm_cv_GTKMATHVIEW_DICTIONARY_PATH=$GTKMATHVIEW_PREFIX/share/gtkmathview/dictionary.xml if test ! -f $helm_cv_GTKMATHVIEW_DICTIONARY_PATH; then read helm_cv_GTKMATHVIEW_DICTIONARY_PATH fi ) GTKMATHVIEW_DICTIONARY_PATH=$helm_cv_GTKMATHVIEW_DICTIONARY_PATH AC_CACHE_CHECK( for font-configuration.xml, helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH, helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH=$GTKMATHVIEW_PREFIX/share/gtkmathview/font-configuration.xml if test ! -f $helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH; then read helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH fi ) GTKMATHVIEW_FONT_CONFIGURATION_PATH=$helm_cv_GTKMATHVIEW_FONT_CONFIGURATION_PATH AC_CACHE_CHECK( for t1lib configuration file, helm_cv_GTKMATHVIEW_T1_CONFIG_FILE, helm_cv_GTKMATHVIEW_T1_CONFIG_FILE=$GTKMATHVIEW_PREFIX/share/gtkmathview/t1.config if test ! -f $helm_cv_GTKMATHVIEW_T1_CONFIG_FILE; then read GTKMATHVIEW_T1_CONFIG_FILE fi ) GTKMATHVIEW_T1_CONFIG_FILE=$helm_cv_GTKMATHVIEW_T1_CONFIG_FILE HELM_DICTIONARY_PATH=$HELM_ETC_DIR/helm-dictionary.xml HELM_FONT_CONFIGURATION_PATH=$HELM_ETC_DIR/helm-font-configuration.xml dnl Only for HELM XML configuration HELM_LIBRARY_DIR=$HELM_VAR_DIR/library HELM_SERVERS_FILE=$HELM_VAR_DIR/servers.txt HELM_URIS_DBM=$HELM_VAR_DIR/urls_of_uris.db dnl CSC: FIXME: getters should download the DTDs HELM_DTD_DIR=$HELM_SHARE_DIR/dtd HELM_STYLE_DIR=$HELM_SHARE_DIR/style dnl HELM prefixes AC_SUBST(RESOLVED_PREFIX) AC_SUBST(RESOLVED_EXEC_PREFIX) dnl HELM version AC_SUBST(PACKAGE) AC_SUBST(VERSION) dnl HELM directories AC_SUBST(HELM_BIN_DIR) AC_SUBST(HELM_LIB_DIR) AC_SUBST(HELM_ETC_DIR) AC_SUBST(HELM_SHARE_DIR) AC_SUBST(HELM_VAR_DIR) AC_SUBST(HELM_TMP_DIR) dnl HELM download directory AC_SUBST(HELM_LIBRARY_DIR) dnl HELM servers AC_SUBST(HELM_SERVERS_FILE) dnl HELM URIS data-base AC_SUBST(HELM_URIS_DBM) dnl HELM DTDs AC_SUBST(HELM_DTD_DIR) dnl HELM stylesheets AC_SUBST(HELM_STYLE_DIR) dnl HELM customized GtkMathView configuration AC_SUBST(HELM_DICTIONARY_PATH) AC_SUBST(HELM_FONT_CONFIGURATION_PATH) AC_SUBST(GTKMATHVIEW_DICTIONARY_PATH) AC_SUBST(GTKMATHVIEW_FONT_CONFIGURATION_PATH) AC_SUBST(GTKMATHVIEW_T1_CONFIG_FILE) AC_OUTPUT( [ Makefile helm-config lib/configuration.pl etc/helm-math-engine-configuration.xml etc/configuration.xml helm_configuration.spec ], chmod +x helm-config)