forked from csirtgadgets/cif-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
108 lines (89 loc) · 3.01 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT(cif-v1, m4_esyscmd_s([git describe --tags]), [ci-framework@googlegroups.com])
AM_INIT_AUTOMAKE([1.9 tar-ustar])
# setup
AC_CONFIG_SUBDIRS([libcif libcif-dbi cif-router cif-smrt])
AC_CONFIG_FILES([
Makefile
])
# Checks for programs.
AC_ARG_VAR([PERL],[Perl interpreter command])
AC_PATH_PROG([PERL], [perl], [not found])
if test "$PERL" = 'not found'; then
AC_MSG_ERROR([cannot use $PACKAGE_NAME without perl])
fi
dnl Defaults paths for installation
AC_PREFIX_DEFAULT([/opt/cif])
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
#dnl CIF_USER
AC_ARG_WITH(user,
AC_HELP_STRING([--with-user=USER],
[user the cif scripts will run as (default: cif)]),
CIF_USER=$withval,
CIF_USER=cif)
AC_SUBST(CIF_USER)
#dnl CIF_GROUP
AC_ARG_WITH(group,
AC_HELP_STRING([--with-group=GROUP],
[group the cif scripts will run as (default: cif)]),
CIF_GROUP=$withval,
CIF_GROUP=$CIF_USER
)
AC_SUBST(CIF_GROUP)
dnl DB_TYPE
AC_ARG_WITH(db-type,
AC_HELP_STRING([--with-db-type=TYPE],
[sort of database RT will use (default: Pg) (only Pg currently valid)]),
DB_TYPE=$withval,
DB_TYPE=Pg)
if test "$DB_TYPE" != 'Pg' ; then
AC_MSG_ERROR([Only Pg is a valid db type])
fi
AC_SUBST(DB_TYPE)
DB_UNIXOWNER=postgres
AC_SUBST(DB_UNIXOWNER)
dnl DB_HOST
AC_ARG_WITH(db-host,
AC_HELP_STRING([--with-db-host=HOSTNAME],
[FQDN of database server (default: localhost)]),
DB_HOST=$withval,
DB_HOST=localhost)
AC_SUBST(DB_HOST)
dnl DB_PORT
AC_ARG_WITH(db-port,
AC_HELP_STRING([--with-db-port=PORT],
[port on which the database listens on (default: 5432]),
DB_PORT=$withval,
DB_PORT=5432)
AC_SUBST(DB_PORT)
AC_ARG_WITH(db-dba,
AC_HELP_STRING([--with-db-dba=DBA],
[name of database administrator (default: postgres)]),
DB_DBA=$withval,
DB_DBA="postgres")
AC_SUBST(DB_DBA)
dnl DB_DATABASE
AC_ARG_WITH(db-database,
AC_HELP_STRING([--with-db-database=DBNAME],
[name of the database to use (default: cif)]),
DB_DATABASE=$withval,
DB_DATABASE=cif)
AC_SUBST(DB_DATABASE)
AC_ARG_WITH(db-index-location,
AC_HELP_STRING([--with-db-index-location=/mnt/index/data],
[default index storage location (default: /mnt/index/data)]),
DB_INDEX_LOC=$withval,
DB_INDEX_LOC=/mnt/index/data)
AC_SUBST(DB_INDEX_LOC)
AC_ARG_WITH(db-archive-location,
AC_HELP_STRING([--with-db-archive-location=/mnt/archive/data],
[default index storage location (default: /mnt/archive/data)]),
DB_ARCHIVE_LOC=$withval,
DB_ARCHIVE_LOC=/mnt/archive/data)
AC_SUBST(DB_ARCHIVE_LOC)
AC_OUTPUT