+
+dnl Make sure we see all GNU and Solaris extensions.
+AC_GNU_SOURCE
+
+
+dnl Checks for the Datadir
+AC_ARG_WITH(datadir,
+ [ --with-datadir directory to store the databases under],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE(HAVE_DATA_DIR,[],[use alternate database location?])
+ AC_DEFINE_UNQUOTED(DATA_DIR, "$withval",[define, if the user suplied a data-directory to use.])
+ MAKE_DATA_DIR=$withval
+ AC_SUBST(MAKE_DATA_DIR)
+ fi
+ ]
+)
+
+dnl Checks for the Datadir
+AC_ARG_WITH(staticdatadir,
+ [ --with-staticdatadir directory to store citadels system messages under],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE(HAVE_STATICDATA_DIR, [], [should we activate an alternate static text location?])
+ AC_DEFINE_UNQUOTED(STATICDATA_DIR, "$withval", [where do we put our static text data?])
+ MAKE_STATICDATA_DIR=$withval
+ AC_SUBST(MAKE_STATICDATA_DIR)
+ fi
+ ]
+)
+
+
+dnl Checks for the SSLdir
+dnl this is a bit different than the rest,
+dnl because of the citadel used to have a keys/ subdir.
+AC_ARG_WITH(ssldir,
+ [ --with-ssldir directory to store the ssl certificates under],
+ [ if test "x$withval" != "xno" ; then
+
+ ssl_dir="$withval"
+ fi
+ AC_SUBST(MAKE_SSL_DIR)
+ ]
+)
+AC_DEFINE_UNQUOTED(SSL_DIR, "$ssl_dir", [were should we put our keys?])
+
+
+dnl Checks for the spooldir
+AC_ARG_WITH(spooldir,
+ [ --with-spooldir directory to keep queues under],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE(HAVE_SPOOL_DIR, [], [enable alternate spool dir?])
+ AC_DEFINE_UNQUOTED(SPOOL_DIR,"$withval", [where do we place our spool dirs?])
+ MAKE_SPOOL_DIR=$withval
+ AC_SUBST(MAKE_SPOOL_DIR)
+ fi
+ ]
+)
+
+
+dnl Checks for the Configdir
+AC_ARG_WITH(sysconfdir,
+ [ --with-sysconfdir directory to store the configs under],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE(HAVE_ETC_DIR, [], [should we search our system config in an alternate place?])
+ AC_DEFINE_UNQUOTED(ETC_DIR, "$withval", [where to search our config files])
+ MAKE_ETC_DIR=$withval
+ AC_SUBST(MAKE_ETC_DIR)
+ fi
+ ]
+)
+
+dnl Checks for where to put our utilities
+AC_ARG_WITH(utility-bindir,
+ [ --with-utility-bindir directory where to find helper binaries],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE(HAVE_UTILBIN_DIR,[],[should we put our helper binaries to another location?])
+ AC_DEFINE_UNQUOTED(UTILBIN_DIR, "$withval", [were to put our helper programs])
+ MAKE_UTILBIN_DIR=$withval
+ AC_SUBST(MAKE_UTILBIN_DIR)
+ fi
+ ]
+)
+
+
+dnl Checks for the run-dir for the sockets
+AC_ARG_WITH(rundir,
+ [ --with-rundir directory to place runtime files (UDS) to?],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE(HAVE_RUN_DIR, [], [should we put our non volatile files elsewhere?])
+ AC_DEFINE_UNQUOTED(RUN_DIR, "$withval", [define, where the config should go in unix style])
+ MAKE_RUN_DIR=$withval
+ AC_SUBST(MAKE_RUN_DIR)
+ fi
+ ]
+)
+
+
+dnl Checks for the Pseudo Random Generator sockets TODO: this keeps being default.
+AC_DEFINE_UNQUOTED(EGD_POOL, "/var/run/egd-pool", [place to keep our pseudo random generator file])
+AC_ARG_WITH(egdpool,
+ [ --with-egdpool the socket from Pseudo Random Generator, defaults to /var/run/egd-pool],
+ [ if test "x$withval" != "xno" ; then
+ AC_DEFINE_UNQUOTED(EGD_POOL, "$withval", [the socket from Pseudo Random Generator])
+ fi
+ ]
+)
+
+
+AC_ARG_WITH(docdir,
+ [ --with-docdir where to install the documentation. default: /usr/local/citadel/],
+ [ if test "x$withval" != "xno" ; then
+ MAKE_DOC_DIR=$withval
+ AC_SUBST(MAKE_DOC_DIR)
+ fi
+ ]
+)
+
+