working commit
This commit is contained in:
+187
@@ -47,7 +47,194 @@ if test -d /lib/systemd/system; then
|
||||
AM_CONDITIONAL(SYSTEMD, true)
|
||||
fi
|
||||
|
||||
|
||||
test "x$prefix" == "xNONE" && prefix=$ac_default_prefix
|
||||
test "x$libexecdir" == "xNONE" && libexecdir=${prefix}/lib
|
||||
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE([devel-mode],
|
||||
AS_HELP_STRING([--enable-devel-mode], [Enable developmend mode]))
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(srv_devel_mode, "false", [developmend mode])
|
||||
AC_SUBST(srv_devel_mode, "false")
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRCDIR=`pwd`
|
||||
enable_devel_mode=yes
|
||||
])
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
SRV_CONFDIR="${prefix}/etc/${PACKAGE}"
|
||||
|
||||
AC_ARG_WITH(confdir,
|
||||
AS_HELP_STRING([--with-confdir=PATH],[set configuration dir to PATH (default: $SRV_CONFDIR)]),
|
||||
[ if test ! -z "$withval" ; then
|
||||
case $withval in
|
||||
/*)
|
||||
SRV_CONFDIR="$withval"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(You must specify an absolute path to --with-confdir=PATH)
|
||||
;;
|
||||
esac
|
||||
fi ])
|
||||
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRV_CONFDIR="${SRCDIR}/etc/${PACKAGE}"
|
||||
sysconfdir="${SRCDIR}/etc/${PACKAGE}"
|
||||
], [
|
||||
test "x$SRV_CONFDIR" == "x/usr/etc/${PACKAGE}" && SRV_CONFDIR="/etc/${PACKAGE}"
|
||||
test "x$prefix" == "x/usr" && sysconfdir="/etc"
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED(SRV_CONFDIR, "$SRV_CONFDIR", [location of configuration files for ${PACKAGE}])
|
||||
AC_SUBST(srv_confdir, "$SRV_CONFDIR")
|
||||
|
||||
AC_MSG_NOTICE(srv_confdir set as ${SRV_CONFDIR})
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
SRV_LOGDIR="/var/log/${PACKAGE}"
|
||||
|
||||
AC_ARG_WITH(logdir,
|
||||
AS_HELP_STRING([--with-logdir=PATH],[set path for logdir (default: $SRV_LOGDIR)]),
|
||||
[ if test ! -z "$withval" ; then
|
||||
case $withval in
|
||||
/*)
|
||||
SRV_LOGDIR="$withval"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(You must specify an absolute path to --with-logdir=PATH)
|
||||
;;
|
||||
esac
|
||||
fi])
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRV_LOGDIR="${SRCDIR}/tmp/log"
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED(SRV_LOGDIR, "$SRV_LOGDIR", [location of ${PACKAGE} logdir])
|
||||
AC_SUBST(srv_logdir, "$SRV_LOGDIR")
|
||||
|
||||
AC_MSG_NOTICE(srv_logdir set as ${SRV_LOGDIR})
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
SRV_RUNDIR="/var/run/${PACKAGE}"
|
||||
|
||||
AC_ARG_WITH(rundir,
|
||||
AS_HELP_STRING([--with-rundir=PATH],[set path for rundir (default: $SRV_RUNDIR)]),
|
||||
[ if test ! -z "$withval" ; then
|
||||
case $withval in
|
||||
/*)
|
||||
SRV_RUNDIR="$withval"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(You must specify an absolute path to --with-rundir=PATH)
|
||||
;;
|
||||
esac
|
||||
fi ])
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRV_RUNDIR="${SRCDIR}/tmp/run"
|
||||
])
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(SRV_RUNDIR, "$SRV_RUNDIR", [location of rundir])
|
||||
AC_SUBST(srv_rundir, "$SRV_RUNDIR")
|
||||
|
||||
AC_MSG_NOTICE(srv_rundir set as ${SRV_RUNDIR})
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
SRV_SHAREDIR="${prefix}/share/$PACKAGE"
|
||||
|
||||
AC_ARG_WITH(sharedir,
|
||||
AS_HELP_STRING([--with-sharedir=PATH],[set share directory (default: $SRV_SHAREDIR)]),
|
||||
[ if test ! -z "$with_sharedir" ; then
|
||||
case $with_sharedir in
|
||||
/*)
|
||||
SRV_SHAREDIR="$withval"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(You must specify an absolute path to --with-sharedir=PATH)
|
||||
;;
|
||||
esac
|
||||
fi ])
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRV_SHAREDIR="${SRCDIR}/share"
|
||||
])
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(SRV_SHAREDIR, "$SRV_SHAREDIR", [location of share dir])
|
||||
AC_SUBST(srv_sharedir, "$SRV_SHAREDIR")
|
||||
|
||||
AC_MSG_NOTICE(srv_sharedir set as ${SRV_SHAREDIR})
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
SRV_LIBDIR="${prefix}/lib/$PACKAGE"
|
||||
|
||||
AC_ARG_WITH(libdir,
|
||||
AS_HELP_STRING([--with-libdir=PATH],[set lib directory (default: $SRV_LIBDIR)]),
|
||||
[ if test ! -z "$withval" ; then
|
||||
case $withval in
|
||||
/*)
|
||||
SRV_LIBDIR="$withval"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(You must specify an absolute path to --with-libdir=PATH)
|
||||
;;
|
||||
esac
|
||||
fi ])
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRV_LIBDIR="${SRCDIR}/sysagent"
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED(SRV_LIBDIR, "$SRV_LIBDIR", [location of lib dir])
|
||||
AC_SUBST(srv_libdir, "$SRV_LIBDIR")
|
||||
|
||||
AC_MSG_NOTICE(srv_libdir set as ${SRV_LIBDIR})
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
SRV_DATADIR="/var/data/${PACKAGE}"
|
||||
|
||||
AC_ARG_WITH(datadir,
|
||||
AS_HELP_STRING([--with-datadir=PATH],[set path for datadir (default: $SRV_DATADIR)]),
|
||||
[ if test ! -z "$withval" ; then
|
||||
case $withval in
|
||||
/*)
|
||||
SRV_DATADIR="$withval"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(You must specify an absolute path to --with-datadir=PATH)
|
||||
;;
|
||||
esac
|
||||
fi])
|
||||
|
||||
AS_IF([test "x$enable_devel_mode" = "xyes"], [
|
||||
SRV_DATADIR="${SRCDIR}/tmp/data"
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED(SRV_DATADIR, "$SRV_DATADIR", [location of ${PACKAGE} datadir])
|
||||
AC_SUBST(srv_datadir, "$SRV_DATADIR")
|
||||
|
||||
AC_MSG_NOTICE(srv_datadir set as ${SRV_DATADIR})
|
||||
|
||||
dnl --------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
app/config/variant.go
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user