summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-18 21:53:20 +0000
committerChristian Persch <chpe@src.gnome.org>2005-04-18 21:53:20 +0000
commitc310878b7b31470e8098d2bf8bd88cc4ab0a389b (patch)
tree59f95469baef841dbec28a55e6b55938029a09d4 /configure.in
parentdc13a61075c93933fda35bdaad6c01bdfa190770 (diff)
downloadtotem-c310878b7b31470e8098d2bf8bd88cc4ab0a389b.tar.gz
Fix plugin installation directory and IDL include directory detection.
2005-04-18 Christian Persch <chpe@cvs.gnome.org> * configure.in: * src/Makefile.am: Fix plugin installation directory and IDL include directory detection. Fixes bug #300879.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 21 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index a754ea1f0..205324706 100644
--- a/configure.in
+++ b/configure.in
@@ -199,10 +199,8 @@ if test "x$ENABLE_MOZILLA" = "xyes" ; then
if test "x$MOZILLA" = "x"; then
if $PKG_CONFIG --exists firefox-gtkmozembed; then
MOZILLA=firefox
- MOZILLA_PLUGINDIR_SUFFIX=mozilla-firefox
elif $PKG_CONFIG --exists mozilla-gtkmozembed; then
MOZILLA=mozilla
- MOZILLA_PLUGINDIR_SUFFIX=mozilla
else
ENABLE_MOZILLA=no
fi
@@ -235,30 +233,39 @@ if test "x$ENABLE_MOZILLA" = "xyes" ; then
AC_SUBST([MOZILLA_LIBS])
fi
-dnl Check for xpidl
+dnl Sets some variables, and check for xpidl
if test "x$ENABLE_MOZILLA" = "xyes" ; then
MOZILLA_PREFIX="`$PKG_CONFIG $MOZILLA-xpcom --variable=prefix`"
-echo "PREFIX: ${MOZILLA_PREFIX}"
- MOZILLA_PLUGINDIR="${MOZILLA_PREFIX}/lib/${MOZILLA_PLUGINDIR_SUFFIX}"
-
MOZILLA_LIBDIR="`$PKG_CONFIG $MOZILLA-xpcom --variable=libdir`"
- MOZILLA_IDLDIR="`echo ${MOZILLA_LIBDIR} | sed -e s/lib/share\\\/idl/`"
- if [ ! test -d $MOZILLA_IDLDIR ]; then
- MOZILLA_INCDIR="`$PKG_CONFIG $MOZILLA-xpcom --variable=includedir`"
- MOZILLA_IDLDIR="${MOZILLA_INCDIR}/idl"
- fi
MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-xpcom`"
+ MOZILLA_PLUGINDIR="${MOZILLA_PLUGINDIR:-$MOZILLA_LIBDIR}"
- AC_PATH_PROG([MOZILLA_XPIDL], [xpidl], [no], [$MOZILLA_LIBDIR])
+ AC_PATH_PROG([MOZILLA_XPIDL], [xpidl], [no], [$MOZILLA_LIBDIR:$PATH])
if test "x$MOZILLA_XPIDL" = "xno"; then
ENABLE_MOZILLA=no
AC_MSG_WARN([xpidl compiler not found])
fi
+ AC_SUBST([MOZILLA_PREFIX])
AC_SUBST([MOZILLA_LIBDIR])
- AC_SUBST([MOZILLA_IDLDIR])
AC_SUBST([MOZILLA_INCLUDE_ROOT])
- AC_SUBST([MOZILLA_PLUGINDIR])
+ AC_ARG_VAR([MOZILLA_PLUGINDIR],[Where to install the plugin to])
+fi
+
+dnl Search for the idl include directory
+if test "x$ENABLE_MOZILLA" = "xyes" ; then
+ dnl This only works on gecko 1.8
+ MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir $MOZILLA-xpcom`"
+ dnl Fallback for older versions
+ if test "x$MOZILLA_IDLDIR" = "x"; then
+ MOZILLA_IDLDIR="`echo $MOZILLA_LIBDIR | sed -e s!lib!share/idl!`"
+ fi
+ dnl Some distributions (Gentoo) have it in unusual places
+ if test "x$MOZILLA_IDLDIR" = "x"; then
+ MOZILLA_IDLDIR="$MOZILLA_INCLUDE_ROOT/idl"
+ fi
+
+ AC_SUBST([MOZILLA_IDLDIR])
fi
if test "x$ENABLE_MOZILLA" = "xyes" ; then