aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in210
1 files changed, 197 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index fcd02ea2e3..16b51f38d8 100644
--- a/configure.in
+++ b/configure.in
@@ -8,7 +8,7 @@ AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
-AC_DEFINE_UNQUOTED(VERSION_COMMENT, "(Preview Release; Code Named: Monkey See Monkey Doo)")
+AC_DEFINE_UNQUOTED(VERSION_COMMENT, "(Preview Release)")
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
@@ -519,7 +519,7 @@ dnl Whether to build shlib components (instead of out-of-proc ones)
dnl ***************************************************************
AC_ARG_ENABLE(shlib-components,
- [ --enable-shlib-components Enable building of some of the components as shared libs],
+ [ --enable-shlib-components Enable building of some of the components as shared libs],
enable_shlib_components=yes,enable_shlib_components=no)
AM_CONDITIONAL(ENABLE_SHLIB_COMPONENTS, test "x$enable_shlib_components" = "xyes")
@@ -584,7 +584,7 @@ int main (int argc, char **argv)
char *pstring;
if (convert_ToPilotChar ("UTF-8", utf8, utf8_real_len, &pstring) == -1)
- exit (1);
+ exit (1);
exit (0);
}
@@ -729,17 +729,201 @@ dnl User wants to override nss with OpenSSL
AC_MSG_WARN([OpenSSL enabled, disabling NSS.])
fi
+AC_ARG_WITH(nspr-includes, [ --with-nspr-includes=PREFIX Location of Mozilla nspr4 includes.],
+ with_nspr_includes="$withval")
+
+AC_ARG_WITH(nspr-libs, [ --with-nspr-libs=PREFIX Location of Mozilla nspr4 libs.],
+ with_nspr_libs="$withval")
+
+AC_ARG_WITH(nss-includes, [ --with-nss-includes=PREFIX Location of Mozilla nss3 includes.],
+ with_nss_includes="$withval")
+
+AC_ARG_WITH(nss-libs, [ --with-nss-libs=PREFIX Location of Mozilla nss3 libs.],
+ with_nss_libs="$withval")
+
if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
- PKG_CHECK_MODULES(NSS, mozilla-nss, have_nss="yes")
- if test "x${have_nss}" = "xyes"; then
- msg_ssl="yes (Mozilla NSS)"
- mozilla_nspr="mozilla-nspr"
- mozilla_nss="mozilla-nss"
- AC_DEFINE(HAVE_NSS)
- AC_DEFINE(HAVE_SSL)
+ if test -z "${with_nspr_includes}" || test -z "${with_nspr_libs}" || test -z "${with_nss_includes}" || test -z "${with_nss_libs}" || test "x${enable_nss}" = "xstatic"; then
+dnl If the user specifies --with-foo or --enable-nss=static, then we have to do this manually
+ check_manually="yes"
+ else
+ check_manually="no"
+ fi
+
+ if test "x${check_manually}" = "xno"; then
+ PKG_CHECK_MODULES(NSS, mozilla-nss, have_nss="yes")
+ if test "x${have_nss}" = "xyes"; then
+ msg_ssl="yes (Mozilla NSS)"
+ mozilla_nspr="mozilla-nspr"
+ mozilla_nss="mozilla-nss"
+ AC_DEFINE(HAVE_NSS)
+ AC_DEFINE(HAVE_SSL)
+ NSPR_CFLAGS=""
+ NSPR_LIBS=""
+ NSS_CFLAGS=""
+ NSS_LIBS=""
+ else
+ check_manually="yes"
+ fi
+ fi
+
+ if test "x${check_manually}" = "xyes"; then
+ mozilla_nss=""
+ have_nspr_includes="no"
+ if test "x${with_nspr_includes}" != "xno"; then
+ CPPFLAGS_save="$CPPFLAGS"
+
+ AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
+ AC_MSG_RESULT("")
+
+ CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
+ AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
+ CPPFLAGS="$CPPFLAGS_save"
+
+ if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
+ have_nspr_includes="yes"
+ NSPR_CFLAGS="-I$with_nspr_includes"
+ fi
+ else
+ AC_MSG_CHECKING(for Mozilla nspr4 includes)
+ AC_MSG_RESULT(no)
+ fi
+
+ have_nspr_libs="no"
+ if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
+ CFLAGS_save="$CFLAGS"
+ LDFLAGS_save="$LDFLAGS"
+
+ if test "$enable_nss" = "static"; then
+ if test -z "${with_nspr_libs}"; then
+ AC_MSG_ERROR([Static linkage requested, but path to nspr libraries not set.]
+[Please specify the path to libnspr4.a]
+[Example: --with-nspr-libs=/usr/lib])
+ else
+ nsprlibs="-ldl $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
+ fi
+ else
+ nsprlibs="-ldl -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
+ fi
+
+ AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
+ [
+ LIBS_save="$LIBS"
+ CFLAGS="$CFLAGS $NSPR_CFLAGS"
+
+ if test "x${with_nspr_libs}" != "x"; then
+ LIBS="$nsprlibs"
+ LDFLAGS="$LDFLAGS -L$with_nspr_libs"
+ else
+ LIBS="$nsprlibs"
+ LDFLAGS="$LDFLAGS"
+ fi
+
+ AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no")
+ CFLAGS="$CFLAGS_save"
+ LDFLAGS="$LDFLAGS_save"
+ LIBS="$LIBS_save"
+ ])
+ if test "x$moz_nspr_libs" != "xno"; then
+ have_nspr_libs="yes"
+ NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
+ else
+ NSPR_CLFAGS=""
+ fi
+ else
+ AC_MSG_CHECKING(for Mozilla nspr4 libraries)
+ AC_MSG_RESULT(no)
+ fi
+
+ if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
+ CPPFLAGS_save="$CPPFLAGS"
+
+ AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
+ AC_MSG_RESULT("")
+
+ if test "x${with_nspr_includes}" != "x"; then
+ CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
+ else
+ CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
+ fi
+
+ AC_CHECK_HEADERS(nss.h ssl.h smime.h,
+ [ have_nss_includes="yes" ],
+ [ have_nss_includes="no" ])
+
+ CPPFLAGS="$CPPFLAGS_save"
+
+ if test "x${have_nss_includes}" = "xyes"; then
+ have_nss_includes="yes"
+ NSS_CFLAGS="-I$with_nss_includes"
+ else
+ NSPR_CFLAGS=""
+ NSPR_LIBS=""
+ fi
+ else
+ AC_MSG_CHECKING(for Mozilla nss3 includes)
+ AC_MSG_RESULT(no)
+ fi
+
+ if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
+ LDFLAGS_save="$LDFLAGS"
+
+ if test "$enable_nss" = "static"; then
+ if test -z "${with_nss_libs}"; then
+ AC_MSG_ERROR([Static linkage requested, but path to nss libraries not set.]
+[Please specify the path to libnss3.a]
+[Example: --with-nspr-libs=/usr/lib/mozilla])
+ else
+ nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
+ case "$host" in
+ *solaris*)
+ nsslibs="$nsslibs $with_nss_libs/libfreebl.a"
+ ;;
+ esac
+ fi
+ else
+ nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
+ fi
+
+ AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
+ [
+ LIBS_save="$LIBS"
+ LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
+ LIBS="$nsslibs $nsprlibs"
+ AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
+ if test "$moz_nss_libs" = no; then
+ nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
+ LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
+ AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
+ fi
+ LDFLAGS="$LDFLAGS_save"
+ LIBS="$LIBS_save"
+ ])
+ if test "$moz_nss_libs" != no; then
+ AC_DEFINE(HAVE_NSS)
+ AC_DEFINE(HAVE_SSL)
+ if test "$enable_nss" = "static"; then
+ msg_ssl="yes (Mozilla NSS:static)"
+ else
+ msg_ssl="yes (Mozilla NSS)"
+ fi # static_nss
+ NSS_LIBS="-L$with_nss_libs $nsslibs"
+ else
+ NSS_CFLAGS=""
+ NSPR_CFLAGS=""
+ NSPR_LIBS=""
+ fi
+ else
+ AC_MSG_CHECKING(for Mozilla nss libraries)
+ AC_MSG_RESULT(no)
+ fi
+
+ NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
+ NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
fi
fi
+AC_SUBST(NSPR_CFLAGS)
+AC_SUBST(NSPR_LIBS)
AC_SUBST(NSS_CFLAGS)
AC_SUBST(NSS_LIBS)
@@ -880,8 +1064,8 @@ AC_SUBST(GNOME_FULL_LIBS)
dnl --- Flags for the various libraries we build
EVO_SET_COMPILE_FLAGS(CAMEL, glib-2.0 gal-2.0 >= $GAL_VERSION $mozilla_nss,
- $THREADS_CFLAGS $KRB4_CFLAGS $OPENSSL_CFLAGS,
- $THREADS_LIBS $KRB4_LDFLAGS $OPENSSL_LDFLAGS)
+ $THREADS_CFLAGS $KRB4_CFLAGS $NSS_CFLAGS $OPENSSL_CFLAGS,
+ $THREADS_LIBS $KRB4_LDFLAGS $NSS_LIBS $OPENSSL_LDFLAGS)
AC_SUBST(CAMEL_CFLAGS)
AC_SUBST(CAMEL_LIBS)
@@ -889,7 +1073,7 @@ EVO_SET_COMPILE_FLAGS(E_NAME, libgnomeui-2.0 libbonoboui-2.0 gal-2.0 >= $GAL_VER
AC_SUBST(E_NAME_CFLAGS)
AC_SUBST(E_NAME_LIBS)
-EVO_SET_COMPILE_FLAGS(E_UTIL, gconf-2.0 libxml-2.0 libbonoboui-2.0 libglade-2.0 gal-2.0 >= $GAL_VERSION libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 soup-2.0 $mozilla_nspr, $THREADS_CFLAGS, $THREADS_LIBS)
+EVO_SET_COMPILE_FLAGS(E_UTIL, gconf-2.0 libxml-2.0 libbonoboui-2.0 libglade-2.0 gal-2.0 >= $GAL_VERSION libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 soup-2.0 $mozilla_nspr, $THREADS_CFLAGS $NSPR_CFLAGS, $THREADS_LIBS $NSPR_LIBS)
AC_SUBST(E_UTIL_CFLAGS)
AC_SUBST(E_UTIL_LIBS)