2 dnl Process this file with autoconf to produce a configure script
4 dnl Embed in generated ./configure script the following CVS info:
5 AC_REVISION($Revision: 1.1 $)dnl
9 AC_INIT(RT, [3.0.4], [rt-3.0-bugs@fsck.com])
10 AC_CONFIG_SRCDIR([lib/RT.pm.in])
12 dnl Extract RT version number components
13 AC_SUBST([rt_version_major],
14 m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\)\.\(\w+\)\(\.\(\w+\)\)?],[\1]))
15 AC_SUBST([rt_version_minor],
16 m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\)\.\(\w+\)\(\.\(\w+\)\)?],[\2]))
17 AC_SUBST([rt_version_patch],
18 m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\)\.\(\w+\)\(\.\(\w+\)\)?],[\4]))
19 test "x$rt_version_major" = 'x' && rt_version_major=0
20 test "x$rt_version_minor" = 'x' && rt_version_minor=0
21 test "x$rt_version_patch" = 'x' && rt_version_patch=0
23 dnl Check for programs
25 AC_ARG_VAR([PERL],[Perl interpreter command])
26 AC_PATH_PROG([PERL], [perl], [not found])
27 if test "$PERL" = 'not found'; then
28 AC_MSG_ERROR([cannot use $PACKAGE_NAME without perl])
31 AC_ARG_WITH(speedycgi,
32 AC_HELP_STRING([--with-speedycgi=/path/to/speedy],
33 [path to your speedycgi binary, if it exists]),
35 SPEEDY_BIN=/usr/local/bin/speedy)
39 dnl Defaults paths for installation
40 AC_PREFIX_DEFAULT([/opt/rt3])
45 AC_HELP_STRING([--with-rt-group=GROUP],
46 [group to own all files (default: rt)]),
52 AC_ARG_WITH(bin-owner,
53 AC_HELP_STRING([--with-bin-owner=OWNER],
54 [user that will own rt binaries (default root)]),
60 AC_ARG_WITH(libs-owner,
61 AC_HELP_STRING([--with-libs-owner=OWNER],
62 [user that will own RT libraries (default root)]),
68 AC_ARG_WITH(libs-group,
69 AC_HELP_STRING([--with-libs-group=GROUP],
70 [group that will own rt binaries (default bin)]),
77 AC_HELP_STRING([--with-db-type=TYPE],
78 [sort of database RT will use (default: mysql) (mysql and Pg are valid)]),
81 if test "$DB_TYPE" != 'mysql' -a "$DB_TYPE" != 'Pg' -a "$DB_TYPE" != 'SQLite'; then
82 AC_MSG_ERROR([Only Pg and mysql are valid db types])
88 AC_HELP_STRING([--with-db-host=HOSTNAME],
89 [FQDN of database server (default: localhost)]),
96 AC_HELP_STRING([--with-db-port=PORT],
97 [port on which the database listens on]),
103 AC_ARG_WITH(db-rt-host,
104 AC_HELP_STRING([--with-db-rt-host=HOSTNAME],
105 [FQDN of RT server which talks to the database server (default: localhost)]),
107 DB_RT_HOST=localhost)
110 dnl DB_DATABASE_ADMIN
112 AC_HELP_STRING([--with-db-dba=DBA],
113 [name of database administrator (default: root)]),
119 AC_ARG_WITH(db-database,
120 AC_HELP_STRING([--with-db-database=DBNAME],
121 [name of the database to use (default: rt3)]),
122 DB_DATABASE=$withval,
124 AC_SUBST(DB_DATABASE)
127 AC_ARG_WITH(db-rt-user,
128 AC_HELP_STRING([--with-db-rt-user=DBUSER],
129 [name of database user (default: rt_user)]),
135 AC_ARG_WITH(db-rt-pass,
136 AC_HELP_STRING([--with-db-rt-pass=PASSWORD],
137 [password for database user (default: rt_pass)]),
143 AC_ARG_WITH(web-user,
144 AC_HELP_STRING([--with-web-user=USER],
145 [user the web server runs as (default: www)]),
151 AC_ARG_WITH(web-group,
152 AC_HELP_STRING([--with-web-group=GROUP],
153 [group the web server runs as (default: www)]),
158 dnl This section maps the variable names this script 'natively' generates
159 dnl to their existing names. They should be removed from here as the .in
160 dnl files are changed to use the new names.
163 AC_SUBST(RT_VERSION_MAJOR, ${rt_version_major})
164 AC_SUBST(RT_VERSION_MINOR, ${rt_version_minor})
165 AC_SUBST(RT_VERSION_PATCH, ${rt_version_patch})
168 AC_SUBST([RT_PATH], ${exp_prefix})
169 AC_SUBST([RT_DOC_PATH], ${exp_manualdir})
170 AC_SUBST([RT_LOCAL_PATH], ${exp_customdir})
171 AC_SUBST([RT_LIB_PATH], ${exp_libdir})
172 AC_SUBST([RT_ETC_PATH], ${exp_sysconfdir})
173 AC_SUBST([CONFIG_FILE_PATH], ${exp_sysconfdir})
174 AC_SUBST([RT_BIN_PATH], ${exp_bindir})
175 AC_SUBST([RT_SBIN_PATH], ${exp_sbindir})
176 AC_SUBST([RT_VAR_PATH], ${exp_localstatedir})
177 AC_SUBST([RT_MAN_PATH], ${exp_mandir})
178 AC_SUBST([MASON_DATA_PATH], ${exp_masonstatedir})
179 AC_SUBST([MASON_SESSION_PATH], ${exp_sessionstatedir})
180 AC_SUBST([MASON_HTML_PATH], ${exp_htmldir})
181 AC_SUBST([LOCAL_ETC_PATH], ${exp_custometcdir})
182 AC_SUBST([MASON_LOCAL_HTML_PATH], ${exp_customhtmldir})
183 AC_SUBST([LOCAL_LEXICON_PATH], ${exp_customlexdir})
184 AC_SUBST([LOCAL_LIB_PATH], ${exp_customlibdir})
185 AC_SUBST([DESTDIR], ${exp_prefix})
186 AC_SUBST([RT_LOG_PATH], ${exp_logfiledir})
188 dnl Configure the output files, and generate them.
191 sbin/rt-setup-database
192 sbin/rt-test-dependencies
200 lib/t/04_send_email.pl
201 bin/mason_handler.fcgi
202 bin/mason_handler.scgi
203 bin/mason_handler.svc
204 bin/rt-commit-handler