import rt 3.4.6
[freeside.git] / rt / configure
index 73818e2..de6576b 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac Revision: 1.1 .
+# From configure.ac Revision: 3739 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for RT 3.2.2.
+# Generated by GNU Autoconf 2.59 for RT 3.4.6.
 #
 # Report bugs to <rt-bugs@fsck.com>.
 #
@@ -270,13 +270,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='RT'
 PACKAGE_TARNAME='rt'
-PACKAGE_VERSION='3.2.2'
-PACKAGE_STRING='RT 3.2.2'
+PACKAGE_VERSION='3.4.6'
+PACKAGE_STRING='RT 3.4.6'
 PACKAGE_BUGREPORT='rt-bugs@fsck.com'
 
 ac_unique_file="lib/RT.pm.in"
 ac_default_prefix=/opt/rt3
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS rt_version_major rt_version_minor rt_version_patch INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PERL SPEEDY_BIN exp_prefix exp_exec_prefix exp_bindir exp_sbindir exp_sysconfdir exp_mandir exp_libdir exp_datadir htmldir exp_htmldir manualdir exp_manualdir exp_localstatedir logfiledir exp_logfiledir masonstatedir exp_masonstatedir sessionstatedir exp_sessionstatedir customdir exp_customdir custometcdir exp_custometcdir customhtmldir exp_customhtmldir customlexdir exp_customlexdir customlibdir exp_customlibdir rt_layout_name RTGROUP BIN_OWNER LIBS_OWNER LIBS_GROUP DB_TYPE DATABASE_ENV_PREF DB_HOST DB_PORT DB_RT_HOST DB_DBA DB_DATABASE DB_RT_USER DB_RT_PASS WEB_USER WEB_GROUP APACHECTL RT_VERSION_MAJOR RT_VERSION_MINOR RT_VERSION_PATCH RT_PATH RT_DOC_PATH RT_LOCAL_PATH RT_LIB_PATH RT_ETC_PATH CONFIG_FILE_PATH RT_BIN_PATH RT_SBIN_PATH RT_VAR_PATH RT_MAN_PATH MASON_DATA_PATH MASON_SESSION_PATH MASON_HTML_PATH LOCAL_ETC_PATH MASON_LOCAL_HTML_PATH LOCAL_LEXICON_PATH LOCAL_LIB_PATH DESTDIR RT_LOG_PATH LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS rt_version_major rt_version_minor rt_version_patch INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK PERL SPEEDY_BIN exp_prefix exp_exec_prefix exp_bindir exp_sbindir exp_sysconfdir exp_mandir exp_libdir exp_datadir htmldir exp_htmldir manualdir exp_manualdir exp_localstatedir logfiledir exp_logfiledir masonstatedir exp_masonstatedir sessionstatedir exp_sessionstatedir customdir exp_customdir custometcdir exp_custometcdir customhtmldir exp_customhtmldir customlexdir exp_customlexdir customlibdir exp_customlibdir rt_layout_name BIN_OWNER LIBS_OWNER LIBS_GROUP DB_TYPE DATABASE_ENV_PREF DB_HOST DB_PORT DB_RT_HOST DB_DBA DB_DATABASE DB_RT_USER DB_RT_PASS WEB_USER WEB_GROUP RTGROUP APACHECTL RT_DEVEL_MODE RT_VERSION_MAJOR RT_VERSION_MINOR RT_VERSION_PATCH RT_PATH RT_DOC_PATH RT_LOCAL_PATH RT_LIB_PATH RT_ETC_PATH CONFIG_FILE_PATH RT_BIN_PATH RT_SBIN_PATH RT_VAR_PATH RT_MAN_PATH MASON_DATA_PATH MASON_SESSION_PATH MASON_HTML_PATH LOCAL_ETC_PATH MASON_LOCAL_HTML_PATH LOCAL_LEXICON_PATH LOCAL_LIB_PATH DESTDIR RT_LOG_PATH LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -729,7 +729,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures RT 3.2.2 to adapt to many kinds of systems.
+\`configure' configures RT 3.4.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -786,7 +786,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of RT 3.2.2:";;
+     short | recursive ) echo "Configuration of RT 3.4.6:";;
    esac
   cat <<\_ACEOF
 
@@ -800,7 +800,6 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-speedycgi=/path/to/speedy
                           path to your speedycgi binary, if it exists
-  --with-rt-group=GROUP   group to own all files (default: rt)
   --with-bin-owner=OWNER  user that will own RT binaries (default root)
   --with-libs-owner=OWNER user that will own RT libraries (default root)
   --with-libs-group=GROUP group that will own RT binaries (default bin)
@@ -820,8 +819,11 @@ Optional Packages:
                           password for database user (default: rt_pass)
   --with-web-user=USER    user the web server runs as (default: www)
   --with-web-group=GROUP  group the web server runs as (default: www)
+  --with-rt-group=GROUP   group to own all files (default: rt)
   --with-my-user-group    set all users and groups to current user/group
   --with-apachectl        instruct RT where to find your apachectl
+  --with-devel-mode       Turn on development aids that might hurt you in
+                          production
 
 Some influential environment variables:
   PERL        Perl interpreter command
@@ -925,7 +927,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-RT configure 3.2.2
+RT configure 3.4.6
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -939,7 +941,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by RT $as_me 3.2.2, which was
+It was created by RT $as_me 3.4.6, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1279,9 +1281,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 rt_version_major=3
 
-rt_version_minor=2
+rt_version_minor=4
 
-rt_version_patch=2
+rt_version_patch=6
 
 test "x$rt_version_major" = 'x' && rt_version_major=0
 test "x$rt_version_minor" = 'x' && rt_version_minor=0
@@ -1391,6 +1393,46 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
@@ -1770,13 +1812,13 @@ fi
 
 
 
-# Check whether --with-rt-group or --without-rt-group was given.
-if test "${with_rt_group+set}" = set; then
-  withval="$with_rt_group"
-  RTGROUP=$withval
-else
-  RTGROUP=rt
-fi;
+# ACRT_USER_EXISTS( users, variable, default )
+# - users is a list of users [www apache www-docs]
+#    from highest to lowest priority to high priority (i.e. first match)
+# - variable is what you set with the result
+#
+
+
 
 
 
@@ -1915,7 +1957,22 @@ if test "${with_web_user+set}" = set; then
   withval="$with_web_user"
   WEB_USER=$withval
 else
-  WEB_USER=www
+
+   WEB_USER=www
+   for x in www www-data apache httpd nobody; do
+    echo "$as_me:$LINENO: checking if user $x exists" >&5
+echo $ECHO_N "checking if user $x exists... $ECHO_C" >&6
+     if  $PERL -e"exit( defined getpwnam('$x') ? 0 : 1)" ; then
+   echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; WEB_USER=$x ; break
+else
+   echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+fi
+
+   done
+
+
 fi;
 
 
@@ -1925,23 +1982,80 @@ if test "${with_web_group+set}" = set; then
   withval="$with_web_group"
   WEB_GROUP=$withval
 else
-  WEB_GROUP=www
+
+   WEB_GROUP=www
+   for x in www www-data apache httpd nogroup nobody; do
+    echo "$as_me:$LINENO: checking if group $x exists" >&5
+echo $ECHO_N "checking if group $x exists... $ECHO_C" >&6
+     if  $PERL -e"exit( defined getgrnam('$x') ? 0 : 1)" ; then
+   echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; WEB_GROUP=$x ; break
+else
+   echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+fi
+
+   done
+
+fi;
+
+
+
+# Check whether --with-rt-group or --without-rt-group was given.
+if test "${with_rt_group+set}" = set; then
+  withval="$with_rt_group"
+  RTGROUP=$withval
+else
+
+   RTGROUP=rt
+   for x in rt3 rt $WEB_GROUP; do
+    echo "$as_me:$LINENO: checking if group $x exists" >&5
+echo $ECHO_N "checking if group $x exists... $ECHO_C" >&6
+     if  $PERL -e"exit( defined getgrnam('$x') ? 0 : 1)" ; then
+   echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; RTGROUP=$x ; break
+else
+   echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+fi
+
+   done
+
 fi;
 
 
 my_group=$(groups|cut -f1 -d' ')
+my_user=${USER:-$LOGNAME}
 
 # Check whether --with-my-user-group or --without-my-user-group was given.
 if test "${with_my_user_group+set}" = set; then
   withval="$with_my_user_group"
   RTGROUP=$my_group
-            BIN_OWNER=$USER
-            LIBS_OWNER=$USER
+            BIN_OWNER=$my_user
+            LIBS_OWNER=$my_user
             LIBS_GROUP=$my_group
-            WEB_USER=$USER
+            WEB_USER=$my_user
             WEB_GROUP=$my_group
 fi;
 
+# Test for valid database names
+if  test "$DB_TYPE" == "mysql" ; then
+   echo "$as_me:$LINENO: checking if database name is valid" >&5
+echo $ECHO_N "checking if database name is valid... $ECHO_C" >&6
+          if  echo $DB_DATABASE | $AWK '/-/ { exit 1 }' ; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+   { { echo "$as_me:$LINENO: error: no.  database name ($DB_DATABASE) contains '-' which is not valid for mysql" >&5
+echo "$as_me: error: no.  database name ($DB_DATABASE) contains '-' which is not valid for mysql" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+
+fi
+
 
 
 
@@ -1955,6 +2069,15 @@ fi;
 
 
 
+# Check whether --with-devel-mode or --without-devel-mode was given.
+if test "${with_devel_mode+set}" = set; then
+  withval="$with_devel_mode"
+  RT_DEVEL_MODE="1"
+else
+  RT_DEVEL_MODE="0"
+fi;
+
+
 RT_VERSION_MAJOR=${rt_version_major}
 
 RT_VERSION_MINOR=${rt_version_minor}
@@ -2002,7 +2125,10 @@ RT_LOG_PATH=${exp_logfiledir}
 
 
 
-                                                                                                                                                                                              ac_config_files="$ac_config_files sbin/rt-setup-database sbin/rt-test-dependencies Makefile etc/RT_Config.pm lib/RT.pm lib/t/00smoke.t lib/t/01harness.t lib/t/02regression.t lib/t/03web.pl lib/t/04_send_email.pl lib/t/05cronsupport.pl bin/mason_handler.fcgi bin/mason_handler.scgi bin/standalone_httpd bin/mason_handler.svc bin/rt-crontool bin/rt-mailgate bin/rt bin/webmux.pl"
+                                                                                          ac_config_files="$ac_config_files sbin/rt-dump-database sbin/rt-setup-database sbin/rt-test-dependencies bin/mason_handler.fcgi bin/mason_handler.scgi bin/standalone_httpd bin/rt-crontool bin/rt-mailgate bin/rt"
+
+
+                                                  ac_config_files="$ac_config_files Makefile etc/RT_Config.pm lib/RT.pm bin/mason_handler.svc bin/webmux.pl"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -2397,7 +2523,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by RT $as_me 3.2.2, which was
+This file was extended by RT $as_me 3.4.6, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -2452,7 +2578,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-RT config.status 3.2.2
+RT config.status 3.4.6
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -2555,24 +2681,19 @@ for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
   # Handling of arguments.
+  "sbin/rt-dump-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-dump-database" ;;
   "sbin/rt-setup-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-setup-database" ;;
   "sbin/rt-test-dependencies" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-test-dependencies" ;;
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "etc/RT_Config.pm" ) CONFIG_FILES="$CONFIG_FILES etc/RT_Config.pm" ;;
-  "lib/RT.pm" ) CONFIG_FILES="$CONFIG_FILES lib/RT.pm" ;;
-  "lib/t/00smoke.t" ) CONFIG_FILES="$CONFIG_FILES lib/t/00smoke.t" ;;
-  "lib/t/01harness.t" ) CONFIG_FILES="$CONFIG_FILES lib/t/01harness.t" ;;
-  "lib/t/02regression.t" ) CONFIG_FILES="$CONFIG_FILES lib/t/02regression.t" ;;
-  "lib/t/03web.pl" ) CONFIG_FILES="$CONFIG_FILES lib/t/03web.pl" ;;
-  "lib/t/04_send_email.pl" ) CONFIG_FILES="$CONFIG_FILES lib/t/04_send_email.pl" ;;
-  "lib/t/05cronsupport.pl" ) CONFIG_FILES="$CONFIG_FILES lib/t/05cronsupport.pl" ;;
   "bin/mason_handler.fcgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.fcgi" ;;
   "bin/mason_handler.scgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.scgi" ;;
   "bin/standalone_httpd" ) CONFIG_FILES="$CONFIG_FILES bin/standalone_httpd" ;;
-  "bin/mason_handler.svc" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.svc" ;;
   "bin/rt-crontool" ) CONFIG_FILES="$CONFIG_FILES bin/rt-crontool" ;;
   "bin/rt-mailgate" ) CONFIG_FILES="$CONFIG_FILES bin/rt-mailgate" ;;
   "bin/rt" ) CONFIG_FILES="$CONFIG_FILES bin/rt" ;;
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "etc/RT_Config.pm" ) CONFIG_FILES="$CONFIG_FILES etc/RT_Config.pm" ;;
+  "lib/RT.pm" ) CONFIG_FILES="$CONFIG_FILES lib/RT.pm" ;;
+  "bin/mason_handler.svc" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.svc" ;;
   "bin/webmux.pl" ) CONFIG_FILES="$CONFIG_FILES bin/webmux.pl" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -2663,6 +2784,7 @@ s,@rt_version_patch@,$rt_version_patch,;t t
 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@AWK@,$AWK,;t t
 s,@PERL@,$PERL,;t t
 s,@SPEEDY_BIN@,$SPEEDY_BIN,;t t
 s,@exp_prefix@,$exp_prefix,;t t
@@ -2695,7 +2817,6 @@ s,@exp_customlexdir@,$exp_customlexdir,;t t
 s,@customlibdir@,$customlibdir,;t t
 s,@exp_customlibdir@,$exp_customlibdir,;t t
 s,@rt_layout_name@,$rt_layout_name,;t t
-s,@RTGROUP@,$RTGROUP,;t t
 s,@BIN_OWNER@,$BIN_OWNER,;t t
 s,@LIBS_OWNER@,$LIBS_OWNER,;t t
 s,@LIBS_GROUP@,$LIBS_GROUP,;t t
@@ -2710,7 +2831,9 @@ s,@DB_RT_USER@,$DB_RT_USER,;t t
 s,@DB_RT_PASS@,$DB_RT_PASS,;t t
 s,@WEB_USER@,$WEB_USER,;t t
 s,@WEB_GROUP@,$WEB_GROUP,;t t
+s,@RTGROUP@,$RTGROUP,;t t
 s,@APACHECTL@,$APACHECTL,;t t
+s,@RT_DEVEL_MODE@,$RT_DEVEL_MODE,;t t
 s,@RT_VERSION_MAJOR@,$RT_VERSION_MAJOR,;t t
 s,@RT_VERSION_MINOR@,$RT_VERSION_MINOR,;t t
 s,@RT_VERSION_PATCH@,$RT_VERSION_PATCH,;t t
@@ -2972,6 +3095,27 @@ s,@INSTALL@,$ac_INSTALL,;t t
     rm -f $tmp/out
   fi
 
+  # Run the commands associated with the file.
+  case $ac_file in
+    sbin/rt-dump-database ) chmod ug+x $ac_file
+                ;;
+    sbin/rt-setup-database ) chmod ug+x $ac_file
+                ;;
+    sbin/rt-test-dependencies ) chmod ug+x $ac_file
+                ;;
+    bin/mason_handler.fcgi ) chmod ug+x $ac_file
+                ;;
+    bin/mason_handler.scgi ) chmod ug+x $ac_file
+                ;;
+    bin/standalone_httpd ) chmod ug+x $ac_file
+                ;;
+    bin/rt-crontool ) chmod ug+x $ac_file
+                ;;
+    bin/rt-mailgate ) chmod ug+x $ac_file
+                ;;
+    bin/rt ) chmod ug+x $ac_file
+                ;;
+  esac
 done
 _ACEOF