diff options
author | Alberto Ruiz <aruiz@aruiz-intel.(none)> | 2008-02-20 16:45:58 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@aruiz-intel.(none)> | 2008-02-20 16:45:58 +0000 |
commit | 4dad4ee3affac5a5b59976a369288df712abaa3c (patch) | |
tree | 6859d9d3590f11d4bbc59e2eaca128bd467e7948 /configure.ac |
* Initial commit.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7325baf --- /dev/null +++ b/configure.ac @@ -0,0 +1,47 @@ +AC_INIT(firefox-apoc-adapter, 1.0) + +AM_INIT_AUTOMAKE + +AC_PROG_CXX +AC_PROG_LIBTOOL + +#Checking and including XPCOM +PKG_CHECK_MODULES(XPCOM, firefox-xpcom, +[ + FIREFOX="yes" + CXXFLAGS="$CXXFLAGS $XPCOM_CFLAGS -DMOZILLA_INTERNAL_API" + LIBS="$LIBS $XPCOM_LIBS" +]) + +XPCOM_LIBDIR=`pkg-config --variable=libdir firefox-xpcom` +COMPONENT_DIR=$XPCOM_LIBDIR/components + +#Checking NSPR headers +NSPR_INCLUDEDIR="" +AC_ARG_WITH(nspr-includes, +AC_HELP_STRING( [--with-nspr-includes=DIR], + [specify the Netscape Portable Runtime include path]), +[ + if test "$withval" != "no" + then + CFLAGS="$CFLAGS -I$withval" + CXXFLAGS="$CXXFLAGS -I$withval" + fi +]) + +AC_CHECK_HEADERS([nspr.h], [], +AC_MSG_ERROR(Netscape Portable Runtime headers not found. +If you have it already installed please use --with-nspr-includes option to specify the correct include path.) +) +AC_CHECK_HEADERS([prtypes.h], [], +AC_MSG_ERROR(Netscape Portable Runtime headers not found. +If you have it already installed please use --with-nspr-includes option to specify the correct include path.) +) + +AC_SUBST(XPCOM_LIBDIR) +AC_SUBST(COMPONENT_DIR) + +AC_OUTPUT([ +Makefile +src/Makefile +]) |