AC_INIT([Foundation], [1.0], [tdondich@itgroundwork.com], [collage]) AC_CONFIG_SRCDIR([maven.xml]) AC_PREFIX_DEFAULT([/usr/local/groundwork]) echo "If you wish to change the default install prefix, you must modify the value in project.properties." if test "$JAVA_HOME" == "" then echo "Your JAVA_HOME environment variable is not set. Set this to your Java JRE Directory" echo "Read the INSTALL documentation on package requirements." exit fi if test "$MAVEN_HOME" == "" then echo "Your MAVEN_HOME environment variable is not set. Set this to your MAVEN Directory" echo "Read the INSTALL documentation on package requirements." exit fi AC_PATH_PROG(perl, perl) if test "$perl" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.perl.dir=$perl" fi AC_ARG_ENABLE(logappend, AS_HELP_STRING([--enable-logappend], [Have Foundation Append to Log File After Restarts]), logappend=true) if test "$logappend" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.log.append=true" fi AC_ARG_WITH(logdir, AS_HELP_STRING([--with-logdir=logdir], [Specify the path to your foundation log directory]), logdir=$withval) if test "$logdir" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.log.dir=$logdir" fi AC_ARG_WITH(nagiosvar, AS_HELP_STRING([--with-nagiosvar=], [Specify the path to your nagios log directory]), nagiosvar=$withval) if test "$nagiosvar" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.nagios.var=$nagiosvar" fi AC_ARG_WITH(nagiosstatus, AS_HELP_STRING([--with-nagiosstatus=], [Specify the path to your nagios status file]), nagiosstatus=$withval) if test "$nagiosstatus" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.nagios.status=$nagiosstatus" fi AC_ARG_WITH(nagiosnagios, AS_HELP_STRING([--with-nagiosnagios=], [Specify the path to your nagios main log file]), nagiosnagios=$withval) if test "$nagiosnagios" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.nagios.nagios=$nagiosnagios" fi AC_ARG_WITH(nagiosconfig, AS_HELP_STRING([--with-nagiosconfig=], [Specify the path to your nagios config file (nagios.cfg)]), nagiosconfig=$withval) if test "$nagiosconfig" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.nagios.config=$nagiosconfig" fi AC_ARG_WITH(nagiosver, AS_HELP_STRING([--with-nagiosver=(1,2)], [Specify the version of nagios to run against (1 or 2 supported)]), nagiosver=$withval) if test "$nagiosver" != "" then if test "$nagiosver" != "1" -a "$nagiosver" != "2" then echo "Version $nagiosver Of Nagios is not supported at this time." exit else MAVENPARMS="$MAVENPARMS -Dorg.groundwork.nagios.version=$nagiosver" fi fi AC_ARG_WITH(dbhost, AS_HELP_STRING([--with-dbhost=], [Specify the hostname or address of the MySQL database server]), dbhost=$withval) AC_ARG_WITH(dbname, AS_HELP_STRING([--with-dbname=], [Specify the name of the database]) dbname=$withval) if test "$dbhost" != "" then if test "$dbname" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.production.database.url=jdbc:mysql://${dbhost}/${dbname}" else MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.production.database.url=jdbc:mysql://${dbhost}/GWCollageDB" fi elif test "$dbname" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.production.database.url=jdbc:mysql://localhost/$dbname" fi AC_ARG_WITH(dbuser, [ --with-dbuser= Specify the username to connect to the database], dbuser=$withval) if test "$dbuser" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.production.database.user=$dbuser" fi AC_ARG_WITH(dbpass, [ --with-dbpass= Specify the password to connect to the database], dbpass=$withval) if test "$dbpass" != "" then MAVENPARMS="$MAVENPARMS -Dorg.groundwork.collage.production.database.password=$dbpass" fi AC_SUBST(MAVENPARMS) AC_CONFIG_FILES([Makefile]) AC_OUTPUT