2 dnl Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program; if not, write to the Free Software
15 dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 dnl Configure paths for Firefox. We used to run firefox-config, but that
18 dnl got too messy. Then with a little experimentation we determined
19 dnl most of the options weren't actually needed... so now the handful
20 dnl of critical headers are part of the plugin/mozilla-sdk sources
21 dnl copied out of a current Firefox release. This greatly simplified
22 dnl both the configuration and compilation processes.
23 AC_DEFUN([GNASH_PATH_NSPR],
28 dnl Look for the header
29 AC_ARG_WITH(nspr-incl, AC_HELP_STRING([--with-nspr-incl], [directory where NSPR headers are]), with_nspr_incl=${withval})
30 AC_CACHE_VAL(ac_cv_path_nspr_incl, [
31 if test x"${with_nspr_incl}" != x ; then
32 if test -f ${with_nspr_incl}/nspr.h ; then
33 ac_cv_path_nspr_incl="-I`(cd ${with_nspr_incl}; pwd)`"
35 AC_MSG_ERROR([${with_nspr_incl} directory doesn't contain mozilla-config.h!])
40 dnl Look for the library
41 AC_ARG_WITH(nspr_lib, AC_HELP_STRING([--with-nspr-lib], [directory where NSPR libraries are]), with_nspr_lib=${withval})
42 AC_CACHE_VAL(ac_cv_path_nspr_lib, [
43 if test x"${with_nspr_lib}" != x ; then
44 if test -f ${with_nspr_libs}/libnspr.so; then
45 ac_cv_path_nspr_lib="-L`(cd ${with_nspr_lib}; pwd)` -lplds4 -lplc4 -lnspr4"
50 #always check to see if we have it; we only use the results if XPCOM is set.
51 #if test x$nspr4 = xyes; then
52 if test x$cross_compiling = xno; then
53 if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_nspr_incl}" = x; then
54 $PKG_CONFIG --exists nspr && ac_cv_path_nspr_incl="`$PKG_CONFIG --cflags-only-I nspr`"
55 $PKG_CONFIG --exists nspr && ac_cv_path_nspr_lib="`$PKG_CONFIG --libs nspr`"
60 if test x"${ac_cv_path_nspr_incl}" != x; then
61 NSPR_CFLAGS="${ac_cv_path_nspr_incl}"
66 if test x"${ac_cv_path_nspr_lib}" != x ; then
67 NSPR_LIBS="${ac_cv_path_nspr_lib}"
77 dnl end of GNASH_PATH_NSPR
81 # indent-tabs-mode: nil