aboutsummaryrefslogtreecommitdiffstats
path: root/macros/mozilla.m4
diff options
context:
space:
mode:
authorKevin Gibbs <kgibbs@src.gnome.org>2001-07-21 05:39:10 +0800
committerKevin Gibbs <kgibbs@src.gnome.org>2001-07-21 05:39:10 +0800
commit5637adc2c07617b7f5ea206d24cfa073787a4e0d (patch)
treeafacbc5d8192c3f0dadffe1601977defcfc12bd5 /macros/mozilla.m4
parentebed1c3e177855c79663ba7208cd620cd76c21f0 (diff)
downloadgsoc2013-evolution-5637adc2c07617b7f5ea206d24cfa073787a4e0d.tar.gz
gsoc2013-evolution-5637adc2c07617b7f5ea206d24cfa073787a4e0d.tar.zst
gsoc2013-evolution-5637adc2c07617b7f5ea206d24cfa073787a4e0d.zip
Make dist, dist check, and rpm are now supported and working. If you want to distribute a copy of SashMo to someone, you should type "make dist" and send them the tarball.
svn path=/trunk/; revision=11279
Diffstat (limited to 'macros/mozilla.m4')
-rw-r--r--macros/mozilla.m466
1 files changed, 66 insertions, 0 deletions
diff --git a/macros/mozilla.m4 b/macros/mozilla.m4
new file mode 100644
index 0000000000..4d753be8e2
--- /dev/null
+++ b/macros/mozilla.m4
@@ -0,0 +1,66 @@
+dnl - Determine where and which version of mozilla is installed on the system
+dnl - Author: Andrew Chatham
+
+AC_DEFUN([AC_CHECK_MOZILLA],[
+ has_mozilla=false
+
+ CFLAGS=${CFLAGS--O}
+
+ mozprefix="/usr"
+
+ AC_ARG_WITH(mozilla,
+ [ --with-mozilla=dir Specify the Mozilla directory],[
+ if test x$withval != x; then
+ mozprefix=$withval
+ fi
+ ], [
+ if test x$MOZILLA != x; then
+ mozprefix="$MOZILLA/dist"
+ fi
+ ])
+
+ MOZILLA_INCLUDE_DIR="$mozprefix/include"
+ MOZILLA_LIB_DIR="$mozprefix/lib"
+ MOZILLA_BIN_DIR="$mozprefix/bin"
+ MOZILLA_IDL_DIR="$mozprefix/idl"
+
+ AC_MSG_CHECKING(for mozilla)
+
+ if ! test -f $MOZILLA_INCLUDE_DIR/nsError.h; then
+ AC_MSG_ERROR("Could not find header nsError.h in includes dir $MOZILLA_INCLUDE_DIR")
+ fi
+
+ if ! test -f $MOZILLA_LIB_DIR/libgtkembedmoz.so; then
+ AC_MSG_ERROR("Could not find library libgtkembedmoz.so in lib dir $MOZILLA_LIB_DIR")
+ fi
+
+ if ! test -f $MOZILLA_IDL_DIR/nsISupports.idl; then
+ AC_MSG_ERROR("Could not find nsISupports.idl in idl dir $MOZILLA_IDL_DIR")
+ fi
+
+ if test -f $MOZILLA_LIB_DIR/defaults/pref/all.js; then
+ ALLJSLOC=$MOZILLA_LIB_DIR/defaults/pref/all.js
+ else
+ ALLJSLOC=$MOZILLA_FIVE_HOME/defaults/pref/all.js
+ fi
+
+ MOZILLA_VER=$(perl $srcdir/macros/mozilla-version.pl $ALLJSLOC)
+
+ if test $MOZILLA_VER -eq "0"; then
+ AC_MSG_ERROR("Could not determine mozilla version")
+ fi
+
+ if test $MOZILLA_VER -lt "91"; then
+ AC_MSG_ERROR("Mozilla version must be at least 0.9.1")
+ else
+ AC_MSG_RESULT(found)
+ fi
+
+ AC_SUBST(MOZILLA_BIN_DIR)
+ AC_SUBST(MOZILLA_LIB_DIR)
+ AC_SUBST(MOZILLA_INCLUDE_DIR)
+ AC_SUBST(MOZILLA_IDL_DIR)
+ AC_SUBST(MOZILLA_VER)
+])
+
+