File:  [mozdev] / epiphany / configure.in
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Nov 26 22:07:19 2002 UTC (17 years, 4 months ago) by mpeseng
Branches: MAIN
CVS tags: HEAD
initial checkin

    1: dnl Process this file with autoconf to produce a configure script.
    2: 
    3: AC_INIT(configure.in)
    4: AC_PREREQ(2.50)
    5: 
    6: GCONF_REQUIRED=1.0.4
    7: GDK_PIXBUF_REQUIRED=0.13.0
    8: GLIB_REQUIRED=1.2.9
    9: LIBGLADE_REQUIRED=0.13
   10: GNOME_LIBS_REQUIRED=1.2.11
   11: GNOME_REQUIRED=1.2.8
   12: GNOME_VFS_REQUIRED=1.0.1
   13: GTK_REQUIRED=1.2.9
   14: LIBXML_REQUIRED=1.8.14
   15: OAF_REQUIRED=0.6.5
   16: ORBIT_REQUIRED=0.5.7
   17: MOZILLA_REQUIRED=1.1
   18: SCROLLKEEPER_REQUIRED=0.1.4
   19: 
   20: AC_SUBST(SCROLLKEEPER_REQUIRED)
   21: AC_SUBST(GNOME_VFS_REQUIRED)
   22: AC_SUBST(LIBXML_REQUIRED)
   23: AC_SUBST(ORBIT_REQUIRED)
   24: AC_SUBST(LIBGLADE_REQUIRED)
   25: AC_SUBST(GNOME_LIBS_REQUIRED)
   26: AC_SUBST(MOZILLA_REQUIRED)
   27: 
   28: AC_ENABLE_SHARED(yes)
   29: AC_ENABLE_STATIC(no)
   30: 
   31: AM_INIT_AUTOMAKE(epiphany, 1.3)
   32: AM_CONFIG_HEADER(config.h)
   33: 
   34: #AM_MAINTAINER_MODE
   35: #if test "x$enable_maintainer_mode" = "xyes"; then
   36: #  AC_DEFINE(MAINTAINER_MODE)
   37: #fi
   38: 
   39: AM_PROG_LIBTOOL
   40: 
   41: AC_ISC_POSIX
   42: AC_PROG_CC
   43: AC_PROG_CXX
   44: AM_PROG_CC_STDC
   45: AC_HEADER_STDC
   46: AC_PROG_INTLTOOL
   47: AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
   48: 
   49: dnl ******************************
   50: dnl Nautilus View checking
   51: dnl ******************************
   52: 
   53: build_nautilus_view=no
   54: AC_ARG_ENABLE(nautilus-view, [  --enable-nautilus-view  (auto,yes,no)
   55: 			  Enable Nautilus View Galeon Component])
   56: 
   57: AC_MSG_CHECKING(if NautilusView Galeon component is wanted)
   58: if test "x$enable_nautilus_view" = "x" ; then
   59:   enable_nautilus_view=auto
   60: fi
   61: if test "x$enable_nautilus_view" = "xauto"; then
   62:   temptest=`pkg-config --cflags libnautilus 2> /dev/null`
   63:   if test "x$temptest" = "x" ; then
   64:      enable_nautilus_view=no
   65:   else
   66:      enable_nautilus_view=yes
   67:   fi
   68: fi
   69: if test "x$enable_nautilus_view" = "xyes"; then
   70:   dnl AC_DEFINE(ENABLE_NAUTILUS_VIEW)
   71:   nautilusview_pkgs=libnautilus
   72: fi
   73: AC_MSG_RESULT($enable_nautilus_view)
   74: AM_CONDITIONAL(ENABLE_NAUTILUS_VIEW, test "x$enable_nautilus_view" = "xyes")
   75: 
   76: dnl See if nautilus is installed in other prefix than epiphany so that we can load
   77: dnl nautilus throbbers even then.  
   78: dnl Maybe FIXME: make this check not require libnautilus.pc
   79: dnl
   80: nautilus_prefix=`pkg-config --variable=prefix libnautilus 2> /dev/null`
   81: if test "x${nautilus_prefix}" != "x"; then
   82:   if test "x${prefix}" = "xNONE"; then
   83:     epiphany_prefix="${ac_default_prefix}"
   84:   else
   85:     epiphany_prefix="${prefix}"
   86:   fi
   87: 
   88:   dnl We already search for nautilus throbbers in epiphany prefix, don't add the
   89:   dnl same directory or we'd show the throbbers twice.
   90:   if test "x${nautilus_prefix}" != "x${epiphany_prefix}"; then
   91:     AC_DEFINE_UNQUOTED(NAUTILUS_PREFIX, "${nautilus_prefix}")
   92:   fi
   93: fi
   94: 
   95: PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY, gtk+-2.0 libxml-2.0 libgnomeui-2.0 libglade-2.0 bonobo-activation-2.0 ORBit-2.0 libglade-2.0 gnome-vfs-2.0 gnome-vfs-module-2.0 gconf-2.0 $nautilusview_pkgs)
   96: AC_SUBST(EPIPHANY_DEPENDENCY_CFLAGS)
   97: AC_SUBST(EPIPHANY_DEPENDENCY_LIBS)
   98: 
   99: ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
  100: AC_SUBST(ORBIT_IDL)
  101: 
  102: LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
  103: AC_SUBST(LIBBONOBO_IDL)
  104: 
  105: BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
  106: AC_SUBST(BONOBO_ACTIVATION_IDL)
  107: 
  108: PKG_CHECK_MODULES(MOZILLA_COMPONENT, mozilla-gtkmozembed)
  109: dnl AC_DEFINE(ENABLE_MOZILLA_EMBED)
  110: AC_SUBST(MOZILLA_COMPONENT_CFLAGS)
  111: AC_SUBST(MOZILLA_COMPONENT_LIBS)
  112: 
  113: MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir mozilla-gtkmozembed`"
  114: AC_SUBST(MOZILLA_INCLUDE_ROOT)
  115: 
  116: MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
  117: AC_SUBST(MOZILLA_HOME)
  118: 
  119: dnl whether to build with DEBUG defined
  120: AC_ARG_WITH(mozilla-debug,
  121: 	[  --with-mozilla-debug        Use a debug mozilla build],
  122: 	CXXFLAGS="-DDEBUG $CXXFLAGS",)
  123: 
  124: AC_ARG_ENABLE(cpp-rtti,
  125:         [  --enable-cpp-rtti       Enable C++ RTTI (for cvs gcc)],,
  126:         enable_cpp_rtti=no)
  127: 
  128: if test "x$enable_cpp_rtti" = "xno"; then
  129:   CXXFLAGS="-fno-rtti $CXXFLAGS"
  130: fi
  131: 
  132: dnl Specify the gconf configuration source, 
  133: dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
  134: 
  135: AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
  136: 
  137: if test x"$GCONFTOOL" = xno; then
  138:   AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
  139: fi
  140: 
  141: AM_GCONF_SOURCE_2
  142: 
  143: dnl *******************************
  144: dnl Internationalization
  145: dnl ******************************* 
  146: dnl Add the languages which your application supports here.
  147: 
  148: ALL_LINGUAS=""
  149: GETTEXT_PACKAGE=epiphany-2.0
  150: AC_SUBST(GETTEXT_PACKAGE)
  151: AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
  152: AM_GLIB_GNU_GETTEXT
  153: 
  154: dnl *********************************************************************
  155: dnl ** GCC FLAGS ********************************************************
  156: dnl *********************************************************************
  157: 
  158: dnl Only use warning flags if we have gcc
  159: if test "x$GCC" = "xyes"; then
  160: 	if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
  161: 		CFLAGS="$CFLAGS -Wall"
  162: 	fi
  163: dnl -W generates way too many unused parameter warnings, ick.
  164: dnl	if test -z "`echo "$CFLAGS" | grep "\-W\>" 2> /dev/null`" ; then
  165: dnl		CFLAGS="$CFLAGS -W"
  166: dnl	fi
  167: 	if test -z "`echo "$CFLAGS" | grep "\-Wmissing-declarations" 2> /dev/null`" ; then
  168: 		CFLAGS="$CFLAGS -Wmissing-declarations"
  169: 	fi
  170: 	if test -z "`echo "$CFLAGS" | grep "\-Wmissing-prototypes" 2> /dev/null`" ; then
  171: 		CFLAGS="$CFLAGS -Wmissing-prototypes"
  172: 	fi
  173: 	if test -z "`echo "$CFLAGS" | grep "\-Wsign-compare" 2> /dev/null`" ; then
  174: 		CFLAGS="$CFLAGS -Wsign-compare"
  175: 	fi
  176: 	if test "x$disable_werror" = "xno"; then
  177:         	if test -z "`echo "$CFLAGS" | grep "\-Werror" 2> /dev/null`" ; then
  178: 	     		CFLAGS="$CFLAGS -Werror"
  179: 		fi
  180:         fi
  181: fi
  182: 
  183: dnl Only use warning flags if we have g++
  184: if test "x$GXX" = "xyes"; then
  185: 	if test -z "`echo "$CXXFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
  186: 		CXXFLAGS="$CXXFLAGS -Wall"
  187: 	fi
  188: dnl	if test -z "`echo "$CXXFLAGS" | grep "\-W\>" 2> /dev/null`" ; then
  189: dnl		CXXFLAGS="$CXXFLAGS -W"
  190: dnl	fi
  191: 	if test -z "`echo "$CXXFLAGS" | grep "\-Wmissing-declarations" 2> /dev/null`" ; then
  192: 		CXXFLAGS="$CXXFLAGS -Wmissing-declarations"
  193: 	fi
  194: 	if test -z "`echo "$CXXFLAGS" | grep "\-Wmissing-prototypes" 2> /dev/null`" ; then
  195: 		CXXFLAGS="$CXXFLAGS -Wmissing-prototypes"
  196: 	fi
  197: 	if test -z "`echo "$CXXFLAGS" | grep "\-Wsign-compare" 2> /dev/null`" ; then
  198: 		CXXFLAGS="$CXXFLAGS -Wsign-compare"
  199: 	fi
  200:         gcc_check=`$CC -v 2>&1 | grep '^gcc version 3\.'`
  201:         if test "x$disable_werror" = "xno"; then
  202:                 if test "$gcc_check" == ""; then
  203:           		if test -z "`echo "$CXXFLAGS" | grep "\-Werror" 2> /dev/null`" ; then
  204: 	        		CXXFLAGS="$CXXFLAGS -Werror"
  205: 		        fi
  206:                 fi
  207:         fi
  208:         if test "$gcc_check" != ""; then
  209:                 CXXFLAGS="$CXXFLAGS -Wno-deprecated"
  210:         fi
  211: fi
  212: 
  213: dnl uninstalled share dir to search data
  214: AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_DIR,"`pwd`/data",[path to source data dir])
  215: 
  216: AC_OUTPUT([
  217: Makefile
  218: data/Makefile
  219: data/glade/Makefile
  220: data/art/Makefile
  221: data/ui/Makefile
  222: data/GNOME_Epiphany_NautilusView.server
  223: data/epiphany.schemas
  224: data/GNOME_Epiphany_Automation.server
  225: lib/Makefile
  226: lib/widgets/Makefile
  227: lib/toolbar/Makefile
  228: embed/Makefile
  229: embed/mozilla/Makefile
  230: src/Makefile
  231: po/Makefile.in
  232: ])

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>