+dnl RTGROUP
+AC_ARG_WITH(rt-group,
+ AC_HELP_STRING([--with-rt-group=GROUP],
+ [group to own all files (default: rt)]),
+ RTGROUP=$withval,
+ ACRT_GROUP_GUESS([rt3 rt $WEB_GROUP],[RTGROUP], [rt]))
+AC_SUBST(RTGROUP)
+
+dnl INSTALL AS ME
+# XXX TODO: The command below to figure out the group brokenly relies on
+# output order (and "id -gn" doesn't work on all platforms).
+my_group=$(groups|cut -f1 -d' ')
+my_user=${USER:-$LOGNAME}
+AC_ARG_WITH(my-user-group,
+ AC_HELP_STRING([--with-my-user-group],
+ [set all users and groups to current user/group]),
+ RTGROUP=$my_group
+ BIN_OWNER=$my_user
+ LIBS_OWNER=$my_user
+ LIBS_GROUP=$my_group
+ WEB_USER=$my_user
+ WEB_GROUP=$my_group)
+
+# Test for valid database names
+AC_MSG_CHECKING([if database name is set])
+ AS_IF([ echo $DB_DATABASE | $PERL -e 'exit(1) unless <> =~ /\S/' ],
+ [ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_ERROR([no. database name is not set]) ]
+ )
+
+AS_IF([ test "$DB_TYPE" = "mysql" ],
+ [ AC_MSG_CHECKING([if database name is valid])
+ AS_IF([ echo $DB_DATABASE | $PERL -e 'exit(1) if <> =~ /-/'],
+ [ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_ERROR([no. database name ($DB_DATABASE) contains '-' which is not valid for mysql]) ]
+ )
+ ]
+ )
+
+
+dnl Set the value of apachectl
+AC_ARG_WITH(apachectl,
+ AC_HELP_STRING([--with-apachectl],
+ [instruct RT where to find your apachectl]),
+ APACHECTL=$withval,
+ APACHECTL=`which apachectl`)
+AC_SUBST(APACHECTL)
+
+dnl RT's "maintainer mode"
+AC_ARG_WITH(devel-mode,[],RT_DEVEL_MODE=$withval,RT_DEVEL_MODE="0")
+AC_ARG_ENABLE(devel-mode,
+ AC_HELP_STRING([--enable-devel-mode],
+ [Turn on development aids that might hurt you in production]),
+ RT_DEVEL_MODE=$enableval,
+ RT_DEVEL_MODE=$RT_DEVEL_MODE)
+if test "$RT_DEVEL_MODE" = yes; then
+ RT_DEVEL_MODE="1"
+else
+ RT_DEVEL_MODE="0"
+fi
+AC_SUBST(RT_DEVEL_MODE)
+
+dnl RT's GraphViz dependency charts
+AC_CHECK_LIB([graph],[aginitlib],RT_GRAPHVIZ="1")
+AC_ARG_WITH(graphviz,[],RT_GRAPHVIZ=$withval)
+AC_ARG_ENABLE(graphviz,
+ AC_HELP_STRING([--enable-graphviz],
+ [Turns on support for RT's GraphViz dependency charts]),
+ RT_GRAPHVIZ=$enableval)
+if test "$RT_GRAPHVIZ" = yes; then
+ RT_GRAPHVIZ="1"
+else
+ RT_GRAPHVIZ="0"
+fi
+AC_SUBST(RT_GRAPHVIZ)
+
+dnl RT's GD pie and bar charts
+AC_CHECK_PROG([RT_GD], [gdlib-config], "yes", "no")
+AC_ARG_WITH(gd,[],RT_GD=$withval)
+AC_ARG_ENABLE(gd,
+ AC_HELP_STRING([--enable-gd],
+ [Turns on support for RT's GD pie and bar charts]),
+ RT_GD=$enableval)
+if test "$RT_GD" = yes; then
+ RT_GD="1"
+else
+ RT_GD="0"
+fi
+AC_SUBST(RT_GD)
+
+dnl RT's GPG support
+AC_CHECK_PROG([RT_GPG], [gpg], "yes", "no")
+AC_ARG_ENABLE(gpg,
+ AC_HELP_STRING([--enable-gpg],
+ [Turns on GNU Privacy Guard (GPG) support]),
+ RT_GPG=$enableval)
+if test "$RT_GPG" = yes; then
+ RT_GPG="1"
+else
+ RT_GPG="0"
+fi
+AC_SUBST(RT_GPG)
+
+dnl SSL support for RT's mailgate
+AC_ARG_WITH(ssl-mailgate,[],RT_SSL_MAILGATE=$withval,RT_SSL_MAILGATE="0")
+AC_ARG_ENABLE(ssl-mailgate,
+ AC_HELP_STRING([--enable-ssl-mailgate],
+ [Turns on support for HTTPS in rt-mailgate]),
+ RT_SSL_MAILGATE=$enableval,
+ RT_SSL_MAILGATE=$RT_SSL_MAILGATE)
+if test "$RT_SSL_MAILGATE" = yes; then
+ RT_SSL_MAILGATE="1"
+else
+ RT_SSL_MAILGATE="0"
+fi
+AC_SUBST(RT_SSL_MAILGATE)
+
+