summaryrefslogtreecommitdiff
path: root/configure.ac
blob: e9c36d8e9090f056147a803221a0b4e9f0e0c433 (plain)
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
AC_INIT(apoc-spi, 1.0)

AM_INIT_AUTOMAKE
AC_JAVA_OPTIONS

AC_EXPAND(datadir, NONE, EXPANDED_DATADIR)

APOCDIR=$EXPANDED_DATADIR'/lib/apoc'

AC_ARG_WITH(apoc-path,
AC_HELP_STRING( [--with-apoc-path=DIR],
		[specify a path to install the apoc libraries (DATADIR/lib/apoc)]),
[
	if test "$withval" != "no"
	then
		APOCDIR=$withval
	fi
])

LDAPJDK=$APOCDIR/ldapjdk.jar

AC_ARG_WITH(ns-ldap-path,
AC_HELP_STRING( [--with-ns-ldap-path=DIR],
		[specify the Netscape's LDAP JDK path or jar file (APOCDIR/ldapjdk.jar)]),
[
	if test "$withval" != "no"
	then
		LDAPJDK=$withval
	fi
])

CLASSPATH="$APOCDIR:$LDAPJDK:.:$CLASSPATH"
export CLASSPATH

AC_PROG_JAVA
AC_PROG_JAR
AC_CHECK_CLASS(netscape.ldap.LDAPConnection, [], [
echo
AC_MSG_ERROR(Mozilla/Netscape LDAP JDK not found in Classpath.
If it is already installed please use --with-ns-ldap-path=DIR to point to the path or jar file.)
])


AC_CHECK_PROG(ANT, ant, ant, no)
if test $ANT == "no"
then
	AC_MSG_ERROR(Apache's Ant was not found in path.)
fi

AC_SUBST(APOCDIR)
AC_SUBST(LDAPJDK)


AC_OUTPUT([
Makefile
src/Makefile
src/com/Makefile
src/com/sun/Makefile
src/com/sun/apoc/Makefile
src/com/sun/apoc/spi/Makefile
src/com/sun/apoc/spi/build.xml
])