esac
])
+AC_CANONICAL_HOST
+# SO_LDFLAGS setting below is a great big ick.
+# But it beats sucking in libtool for one small part of the source tree.
+case $host_os in
+solaris*)
+ short_os=solaris
+ SO_LDFLAGS="-G"
+ ;;
+irix*)
+ short_os=irix
+ SO_LDFLAGS="-shared"
+ ;;
+linux*)
+ short_os=linux
+ SO_LDFLAGS="-shared"
+ ;;
+esac
+AC_SUBST(SO_LDFLAGS)
+
dnl Define for both C and Pro*C
AC_DEFUN(MR_DEFINE, [
AC_DEFINE($1)
AC_SUBST(SQL_LIBS)
AC_SUBST(SVRSUBDIRS)
+# Java support, for webmoira
+AC_MSG_CHECKING(for Java)
+AC_ARG_WITH(java,
+ [ --with-java=PREFIX Specify location of Java libs and headers],
+ [ java="$withval"],
+ [if test -n "$JAVA_HOME" -a -d "$JAVA_HOME"; then
+ java=$JAVA_HOME
+ else
+ java=no
+ fi])
+AC_MSG_RESULT($java)
+if test "$java" != no; then
+ if test "$java" != yes; then
+ JAVA_CPPFLAGS="-I$java/include -I$java/include/$short_os"
+ fi
+ MR_DEFINE(HAVE_JAVA)
+
+ WEBMOIRA_SUBDIRS="webmoira"
+ WEBMOIRA_OUTPUT_FILES="webmoira/Makefile"
+fi
+AC_SUBST(JAVA_CPPFLAGS)
+AC_SUBST(WEBMOIRA_SUBDIRS)
+
# LDAP support
AC_MSG_CHECKING(for LDAP)
AC_ARG_WITH(ldap,
AC_CHECK_HEADERS(unistd.h getopt.h)
+AC_CHECK_HEADER(netinet/in.h, AC_DEFINE(HAVE_NETINET_IN_H), no_netinet_in=yes)
+
+if test "$no_netinet_in" != "yes"; then
+ AC_MSG_CHECKING(for in_addr_t defined in netinet/in.h)
+ AC_EGREP_HEADER(in_addr_t, netinet/in.h,
+ ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)
+ AC_MSG_RESULT($ac_cv_type_in_addr_t)
+fi
+
+if test "$ac_cv_type_in_addr_t" != "yes"; then
+ AC_DEFINE(in_addr_t, uint32_t)
+fi
+
MR_EXTEND(PRO_C_INCLUDES, INCLUDE='$(srcdir)')
MR_INCLUDE('$(SRCTOP)/include')
MR_INCLUDE('$(SRCTOP)/lib')
clients/chpobox/Makefile clients/chsh/Makefile \
clients/mailmaint/Makefile clients/moira/Makefile \
clients/mrcheck/Makefile clients/mrtest/Makefile \
- clients/stella/Makefile update/Makefile man/Makefile \
+ clients/stanley/Makefile clients/stella/Makefile \
+ update/Makefile man/Makefile $WEBMOIRA_OUTPUT_FILES \
$SERVER_OUTPUT_FILES $WINAD_OUTPUT_FILES $AFS_OUTPUT_FILES \
$RSAREF_OUTPUT_FILES)