summaryrefslogtreecommitdiff
path: root/www/oops/scripts/configure.oops
blob: 1aa2f69016f8f51ab0331010e434f182f3d9efa7 (plain) (blame)
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
#!/bin/sh
#

if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
	exit
fi

tempfile=`mktemp -t checklist`
if [ "${BATCH}" = "yes" ]; then
	set \"GigaBase\"
else
	/usr/bin/dialog --title "OOPS configuration options" --clear \
		--checklist "\n\
Please select desired options:\n\
(please select ONLY ONE DB storages)" -1 -1 16 \
GigaBase		"GigaBase storage" OFF \
DB4			"Berkeley DB v4 storage" OFF \
MySQL			"MySQL auth support" OFF \
PgSQL			"PostgreSQL auth support" OFF \
PCRE			"PCRE support" OFF \
2> $tempfile

	retval=$?

	if [ -s $tempfile ]; then
		set `cat $tempfile`
	fi
	rm -f $tempfile

	case $retval in
		0)	if [ -z "$*" ]; then
				echo "Nothing selected"
			fi
			;;
		1)	echo "Cancel pressed."
			exit 1;
			;;
	esac
fi

${MKDIR} ${WRKDIRPREFIX}${CURDIR}
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc

echo "PREFIX=   ${PREFIX}"

while [ "$1" ]; do
	case $1 in
		\"GigaBase\")
			echo "LIB_DEPENDS+=	gigabase_r.2:\${PORTSDIR}/databases/gigabase"
			echo "CONFIGURE_ARGS+=	--without-DB"
			;;
		\"DB4\")
			echo "LIB_DEPENDS+=	db4.0:\${PORTSDIR}/databases/db4"
			echo "CONFIGURE_ARGS+=	--without-GB"
			;;
		\"MySQL\")
			echo "LIB_DEPENDS+=	mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
			echo "CONFIGURE_ARGS+=	--with-MYSQL=\${PREFIX}"
			;;
		\"PgSQL\")
			echo "LIB_DEPENDS+=	pq.2:\${PORTSDIR}/databases/postgresql7"
			echo "CONFIGURE_ARGS+=	--with-PGSQL=\${PREFIX}/pgsql"
			;;
		\"PCRE\")
			echo "LIB_DEPENDS+=	pcre.0:\${PORTSDIR}/devel/pcre"
			echo "CONFIGURE_ARGS+=	--with-regexp=pcre"
			;;
		*)
			echo "Invalid option(s): $*" > /dev/stderr
			rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
			exit 1
			;;
	esac
	shift
done