Bug 337285 - shouldn't need camino/config/mozconfig to build, r=mento

This commit is contained in:
benjamin%smedbergs.us 2006-05-12 16:54:56 +00:00
Родитель f77c180bf1
Коммит a5b616bd80
2 изменённых файлов: 319 добавлений и 319 удалений

Просмотреть файл

@ -1,12 +1,5 @@
mk_add_options MOZ_CO_PROJECT=macbrowser
ac_add_options --enable-application=macbrowser
ac_add_options --enable-default-toolkit=cocoa
ac_add_options --disable-tests
ac_add_options --disable-accessibility
ac_add_options --disable-jsd
ac_add_options --enable-single-profile
ac_add_options --enable-canvas
ac_add_options --enable-svg
# Pick the right SDK depending on the CPU. This doesn't even pretend to be
# cross-friendly, but neither do other parts of the Camino build, and it's

Просмотреть файл

@ -3983,317 +3983,6 @@ MOZ_ARG_WITH_STRING(java-bin-path,
[ --with-java-bin-path=dir Location of Java binaries (java, javac, jar)],
JAVA_BIN_PATH=$withval)
dnl ========================================================
dnl =
dnl = Toolkit Options
dnl =
dnl ========================================================
MOZ_ARG_HEADER(Toolkit Options)
dnl ========================================================
dnl = Select the default toolkit
dnl ========================================================
MOZ_ARG_ENABLE_STRING(default-toolkit,
[ --enable-default-toolkit=TK
Select default toolkit
Platform specific defaults:
BeOS - beos
Mac OS X - mac (carbon)
Neutrino/QNX - photon
OS/2 - os2
Win32 - windows
* - gtk],
[ _DEFAULT_TOOLKIT=$enableval ],
[ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT])
if test "$_DEFAULT_TOOLKIT" = "gtk" \
-o "$_DEFAULT_TOOLKIT" = "qt" \
-o "$_DEFAULT_TOOLKIT" = "gtk2" \
-o "$_DEFAULT_TOOLKIT" = "xlib" \
-o "$_DEFAULT_TOOLKIT" = "os2" \
-o "$_DEFAULT_TOOLKIT" = "beos" \
-o "$_DEFAULT_TOOLKIT" = "photon" \
-o "$_DEFAULT_TOOLKIT" = "mac" \
-o "$_DEFAULT_TOOLKIT" = "windows" \
-o "$_DEFAULT_TOOLKIT" = "cocoa" \
-o "$_DEFAULT_TOOLKIT" = "cairo-windows" \
-o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \
-o "$_DEFAULT_TOOLKIT" = "cairo-beos" \
-o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \
-o "$_DEFAULT_TOOLKIT" = "cairo-mac" \
-o "$_DEFAULT_TOOLKIT" = "cairo-cocoa"
then
dnl nglayout only supports building with one toolkit,
dnl so ignore everything after the first comma (",").
MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"`
else
if test "$no_x" != "yes"; then
AC_MSG_ERROR([Toolkit must be xlib, gtk, gtk2 or qt.])
else
AC_MSG_ERROR([Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT or cairo-$_PLATFORM_DEFAULT_TOOLKIT (if supported).])
fi
fi
AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_TOOLKIT")
dnl ========================================================
dnl = Enable the toolkit as needed =
dnl ========================================================
case "$MOZ_WIDGET_TOOLKIT" in
gtk)
MOZ_ENABLE_GTK=1
MOZ_ENABLE_XREMOTE=1
if test "$_HAVE_FREETYPE2"; then
MOZ_ENABLE_FREETYPE2=1
fi
MOZ_ENABLE_XPRINT=1
TK_CFLAGS='$(MOZ_GTK_CFLAGS)'
TK_LIBS='$(MOZ_GTK_LDFLAGS)'
AC_DEFINE(MOZ_WIDGET_GTK)
;;
gtk2)
MOZ_ENABLE_GTK2=1
MOZ_ENABLE_XREMOTE=1
MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-}
TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
TK_LIBS='$(MOZ_GTK2_LIBS)'
AC_DEFINE(MOZ_WIDGET_GTK2)
;;
xlib)
MOZ_ENABLE_XLIB=1
if test "$_HAVE_FREETYPE2"; then
MOZ_ENABLE_FREETYPE2=1
fi
MOZ_ENABLE_XPRINT=1
TK_CFLAGS='$(MOZ_XLIB_CFLAGS)'
TK_LIBS='$(MOZ_XLIB_LDFLAGS)'
AC_DEFINE(MOZ_WIDGET_XLIB)
;;
qt)
MOZ_ENABLE_QT=1
if test "$_HAVE_FREETYPE2"; then
MOZ_ENABLE_FREETYPE2=1
fi
MOZ_ENABLE_XPRINT=1
TK_CFLAGS='$(MOZ_QT_CFLAGS)'
TK_LIBS='$(MOZ_QT_LDFLAGS)'
AC_DEFINE(MOZ_WIDGET_QT)
;;
photon)
MOZ_ENABLE_PHOTON=1
AC_DEFINE(MOZ_WIDGET_PHOTON)
;;
mac|cocoa)
TK_LIBS='-framework Carbon'
TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon"
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
MOZ_USER_DIR="Mozilla"
AC_DEFINE(XP_MACOSX)
AC_DEFINE(TARGET_CARBON)
AC_DEFINE(TARGET_API_MAC_CARBON)
if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
MOZ_ENABLE_COCOA=1
AC_DEFINE(MOZ_WIDGET_COCOA)
fi
;;
cairo-windows)
MOZ_WIDGET_TOOLKIT=windows
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
;;
cairo-gtk2)
MOZ_WIDGET_TOOLKIT=gtk2
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
MOZ_ENABLE_GTK2=1
MOZ_ENABLE_XREMOTE=1
TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_CAIRO_CFLAGS)'
TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_CAIRO_LIBS)'
AC_DEFINE(MOZ_WIDGET_GTK2)
;;
cairo-beos)
MOZ_WIDGET_TOOLKIT=beos
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
TK_LIBS='$(MOZ_CAIRO_LIBS)'
;;
cairo-xlib)
MOZ_WIDGET_TOOLKIT=xlib
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
MOZ_ENABLE_XLIB=1
TK_CFLAGS='$(MOZ_XLIB_CFLAGS) $(MOZ_CAIRO_FLAGS)'
TK_LIBS='$(MOZ_XLIB_LDFLAGS) $(MOZ_CAIRO_LIBS)'
AC_DEFINE(MOZ_WIDGET_XLIB)
;;
cairo-mac|cairo-cocoa)
if test "$MOZ_WIDGET_TOOLKIT" = "cairo-cocoa"; then
MOZ_WIDGET_TOOLKIT=cocoa
AC_DEFINE(MOZ_WIDGET_COCOA)
MOZ_ENABLE_COCOA=1
else
MOZ_WIDGET_TOOLKIT=mac
fi
MOZ_ENABLE_CAIRO_GFX=1
MOZ_GFX_TOOLKIT=cairo
MOZ_USER_DIR="Mozilla"
AC_DEFINE(XP_MACOSX)
AC_DEFINE(TARGET_CARBON)
AC_DEFINE(TARGET_API_MAC_CARBON)
TK_LIBS='-framework Carbon'
TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon"
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
;;
esac
if test "$MOZ_ENABLE_XREMOTE"; then
AC_DEFINE(MOZ_ENABLE_XREMOTE)
fi
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_ENABLE_GTK"
then
AM_PATH_GTK($GTK_VERSION,,
AC_MSG_ERROR(Test for GTK failed.))
MOZ_GTK_LDFLAGS=$GTK_LIBS
MOZ_GTK_CFLAGS=$GTK_CFLAGS
fi
if test "$MOZ_ENABLE_GTK2"
then
PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0)
fi
if test "$MOZ_ENABLE_XLIB"
then
MOZ_XLIB_CFLAGS="$X_CFLAGS"
MOZ_XLIB_LDFLAGS="$XLDFLAGS"
MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS"
fi
if test "$MOZ_ENABLE_QT"
then
MOZ_ARG_WITH_STRING(qtdir,
[ --with-qtdir=\$dir Specify Qt directory ],
[ QTDIR=$withval])
if test -z "$QTDIR"; then
QTDIR="/usr"
fi
QTINCDIR="/include/qt"
if test ! -d "$QTDIR$QTINCDIR"; then
QTINCDIR="/include/X11/qt"
fi
if test ! -d "$QTDIR$QTINCDIR"; then
QTINCDIR="/include"
fi
if test -x "$QTDIR/bin/moc"; then
HOST_MOC="$QTDIR/bin/moc"
else
AC_CHECK_PROGS(HOST_MOC, moc, "")
fi
if test -z "$HOST_MOC"; then
AC_MSG_ERROR([no acceptable moc preprocessor found])
fi
MOC=$HOST_MOC
QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL"
if test -z "$MOZ_DEBUG"; then
QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG"
fi
_SAVE_LDFLAGS=$LDFLAGS
QT_LDFLAGS=-L${QTDIR}/lib
LDFLAGS="$LDFLAGS $QT_LDFLAGS"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_LIB(qt, main, QT_LIB=-lqt,
AC_CHECK_LIB(qt-mt, main, QT_LIB=-lqt-mt,
AC_MSG_ERROR([Cannot find QT libraries.])))
LDFLAGS=$_SAVE_LDFLAGS
QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11"
MOZ_QT_LDFLAGS=$QT_LIBS
MOZ_QT_CFLAGS=$QT_CFLAGS
_SAVE_CXXFLAGS=$CXXFLAGS
_SAVE_LIBS=$LIBS
CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
LIBS="$LIBS $QT_LIBS"
AC_MSG_CHECKING(Qt - version >= $QT_VERSION)
AC_TRY_COMPILE([#include <qglobal.h>],
[
#if (QT_VERSION < $QT_VERSION_NUM)
#error "QT_VERSION too old"
#endif
],result="yes",result="no")
AC_MSG_RESULT("$result")
if test "$result" = "no"; then
AC_MSG_ERROR([Qt Mozilla requires at least version $QT_VERSION of Qt])
fi
CXXFLAGS=$_SAVE_CXXFLAGS
LIBS=$_SAVE_LIBS
AC_LANG_RESTORE
fi
fi # COMPILE_ENVIRONMENT
AC_SUBST(MOZ_DEFAULT_TOOLKIT)
AC_SUBST(GTK_CONFIG)
AC_SUBST(TK_CFLAGS)
AC_SUBST(TK_LIBS)
AC_SUBST(MOZ_ENABLE_GTK)
AC_SUBST(MOZ_ENABLE_XLIB)
AC_SUBST(MOZ_ENABLE_GTK2)
AC_SUBST(MOZ_ENABLE_QT)
AC_SUBST(MOZ_ENABLE_PHOTON)
AC_SUBST(MOZ_ENABLE_COCOA)
AC_SUBST(MOZ_ENABLE_CAIRO_GFX)
AC_SUBST(MOZ_ENABLE_GLITZ)
AC_SUBST(MOZ_ENABLE_XREMOTE)
AC_SUBST(MOZ_GTK_CFLAGS)
AC_SUBST(MOZ_GTK_LDFLAGS)
AC_SUBST(MOZ_GTK2_CFLAGS)
AC_SUBST(MOZ_GTK2_LIBS)
AC_SUBST(MOZ_XLIB_CFLAGS)
AC_SUBST(MOZ_XLIB_LDFLAGS)
AC_SUBST(MOZ_QT_CFLAGS)
AC_SUBST(MOZ_QT_LDFLAGS)
AC_SUBST(MOC)
if test "$MOZ_ENABLE_CAIRO_GFX"
then
AC_DEFINE(MOZ_THEBES)
AC_DEFINE(MOZ_CAIRO_GFX)
fi
if test "$MOZ_ENABLE_GTK" \
|| test "$MOZ_ENABLE_QT" \
|| test "$MOZ_ENABLE_XLIB" \
|| test "$MOZ_ENABLE_GTK2"
then
AC_DEFINE(MOZ_X11)
MOZ_X11=1
fi
AC_SUBST(MOZ_X11)
dnl ========================================================
dnl =
dnl = Application
@ -4575,7 +4264,6 @@ browser)
minimo)
MOZ_APP_NAME=minimo
MOZ_APP_DISPLAYNAME=minimo
ACCESSIBILITY=
AC_DEFINE(MINIMO)
MINIMO=1
MOZ_APP_VERSION=`cat $topsrcdir/minimo/config/version.txt`
@ -4651,9 +4339,15 @@ xulrunner)
macbrowser)
MOZ_APP_NAME=mozilla
_PLATFORM_DEFAULT_TOOLKIT=cocoa
ENABLE_TESTS=
ACCESSIBILITY=
MOZ_JSDEBUGGER=
MOZ_SINGLE_PROFILE=1
MOZ_APP_DISPLAYNAME=Mozilla
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_EXTENSIONS_DEFAULT=" cookie typeaheadfind permissions"
# MOZ_XUL_APP=1
MOZ_AUTH_EXTENSION=
MOZ_PREF_EXTENSIONS=
MOZ_WEBSERVICES=
@ -4711,6 +4405,319 @@ if test "$MOZ_XUL_APP"; then
AC_DEFINE(MOZ_XUL_APP)
fi
dnl ========================================================
dnl =
dnl = Toolkit Options
dnl =
dnl ========================================================
MOZ_ARG_HEADER(Toolkit Options)
dnl ========================================================
dnl = Select the default toolkit
dnl ========================================================
MOZ_ARG_ENABLE_STRING(default-toolkit,
[ --enable-default-toolkit=TK
Select default toolkit
Platform specific defaults:
BeOS - beos
Mac OS X - mac (carbon)
Neutrino/QNX - photon
OS/2 - os2
Win32 - windows
* - gtk],
[ _DEFAULT_TOOLKIT=$enableval ],
[ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT])
if test "$_DEFAULT_TOOLKIT" = "gtk" \
-o "$_DEFAULT_TOOLKIT" = "qt" \
-o "$_DEFAULT_TOOLKIT" = "gtk2" \
-o "$_DEFAULT_TOOLKIT" = "xlib" \
-o "$_DEFAULT_TOOLKIT" = "os2" \
-o "$_DEFAULT_TOOLKIT" = "beos" \
-o "$_DEFAULT_TOOLKIT" = "photon" \
-o "$_DEFAULT_TOOLKIT" = "mac" \
-o "$_DEFAULT_TOOLKIT" = "windows" \
-o "$_DEFAULT_TOOLKIT" = "cocoa" \
-o "$_DEFAULT_TOOLKIT" = "cairo-windows" \
-o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \
-o "$_DEFAULT_TOOLKIT" = "cairo-beos" \
-o "$_DEFAULT_TOOLKIT" = "cairo-xlib" \
-o "$_DEFAULT_TOOLKIT" = "cairo-mac" \
-o "$_DEFAULT_TOOLKIT" = "cairo-cocoa"
then
dnl nglayout only supports building with one toolkit,
dnl so ignore everything after the first comma (",").
MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"`
else
if test "$no_x" != "yes"; then
AC_MSG_ERROR([Toolkit must be xlib, gtk, gtk2 or qt.])
else
AC_MSG_ERROR([Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT or cairo-$_PLATFORM_DEFAULT_TOOLKIT (if supported).])
fi
fi
AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_TOOLKIT")
dnl ========================================================
dnl = Enable the toolkit as needed =
dnl ========================================================
case "$MOZ_WIDGET_TOOLKIT" in
gtk)
MOZ_ENABLE_GTK=1
MOZ_ENABLE_XREMOTE=1
if test "$_HAVE_FREETYPE2"; then
MOZ_ENABLE_FREETYPE2=1
fi
MOZ_ENABLE_XPRINT=1
TK_CFLAGS='$(MOZ_GTK_CFLAGS)'
TK_LIBS='$(MOZ_GTK_LDFLAGS)'
AC_DEFINE(MOZ_WIDGET_GTK)
;;
gtk2)
MOZ_ENABLE_GTK2=1
MOZ_ENABLE_XREMOTE=1
MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-}
TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
TK_LIBS='$(MOZ_GTK2_LIBS)'
AC_DEFINE(MOZ_WIDGET_GTK2)
;;
xlib)
MOZ_ENABLE_XLIB=1
if test "$_HAVE_FREETYPE2"; then
MOZ_ENABLE_FREETYPE2=1
fi
MOZ_ENABLE_XPRINT=1
TK_CFLAGS='$(MOZ_XLIB_CFLAGS)'
TK_LIBS='$(MOZ_XLIB_LDFLAGS)'
AC_DEFINE(MOZ_WIDGET_XLIB)
;;
qt)
MOZ_ENABLE_QT=1
if test "$_HAVE_FREETYPE2"; then
MOZ_ENABLE_FREETYPE2=1
fi
MOZ_ENABLE_XPRINT=1
TK_CFLAGS='$(MOZ_QT_CFLAGS)'
TK_LIBS='$(MOZ_QT_LDFLAGS)'
AC_DEFINE(MOZ_WIDGET_QT)
;;
photon)
MOZ_ENABLE_PHOTON=1
AC_DEFINE(MOZ_WIDGET_PHOTON)
;;
mac|cocoa)
TK_LIBS='-framework Carbon'
TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon"
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
MOZ_USER_DIR="Mozilla"
AC_DEFINE(XP_MACOSX)
AC_DEFINE(TARGET_CARBON)
AC_DEFINE(TARGET_API_MAC_CARBON)
if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
MOZ_ENABLE_COCOA=1
AC_DEFINE(MOZ_WIDGET_COCOA)
fi
;;
cairo-windows)
MOZ_WIDGET_TOOLKIT=windows
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
;;
cairo-gtk2)
MOZ_WIDGET_TOOLKIT=gtk2
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
MOZ_ENABLE_GTK2=1
MOZ_ENABLE_XREMOTE=1
TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_CAIRO_CFLAGS)'
TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_CAIRO_LIBS)'
AC_DEFINE(MOZ_WIDGET_GTK2)
;;
cairo-beos)
MOZ_WIDGET_TOOLKIT=beos
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
TK_LIBS='$(MOZ_CAIRO_LIBS)'
;;
cairo-xlib)
MOZ_WIDGET_TOOLKIT=xlib
MOZ_GFX_TOOLKIT=cairo
MOZ_ENABLE_CAIRO_GFX=1
MOZ_ENABLE_XLIB=1
TK_CFLAGS='$(MOZ_XLIB_CFLAGS) $(MOZ_CAIRO_FLAGS)'
TK_LIBS='$(MOZ_XLIB_LDFLAGS) $(MOZ_CAIRO_LIBS)'
AC_DEFINE(MOZ_WIDGET_XLIB)
;;
cairo-mac|cairo-cocoa)
if test "$MOZ_WIDGET_TOOLKIT" = "cairo-cocoa"; then
MOZ_WIDGET_TOOLKIT=cocoa
AC_DEFINE(MOZ_WIDGET_COCOA)
MOZ_ENABLE_COCOA=1
else
MOZ_WIDGET_TOOLKIT=mac
fi
MOZ_ENABLE_CAIRO_GFX=1
MOZ_GFX_TOOLKIT=cairo
MOZ_USER_DIR="Mozilla"
AC_DEFINE(XP_MACOSX)
AC_DEFINE(TARGET_CARBON)
AC_DEFINE(TARGET_API_MAC_CARBON)
TK_LIBS='-framework Carbon'
TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon"
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
;;
esac
if test "$MOZ_ENABLE_XREMOTE"; then
AC_DEFINE(MOZ_ENABLE_XREMOTE)
fi
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_ENABLE_GTK"
then
AM_PATH_GTK($GTK_VERSION,,
AC_MSG_ERROR(Test for GTK failed.))
MOZ_GTK_LDFLAGS=$GTK_LIBS
MOZ_GTK_CFLAGS=$GTK_CFLAGS
fi
if test "$MOZ_ENABLE_GTK2"
then
PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0)
fi
if test "$MOZ_ENABLE_XLIB"
then
MOZ_XLIB_CFLAGS="$X_CFLAGS"
MOZ_XLIB_LDFLAGS="$XLDFLAGS"
MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS"
fi
if test "$MOZ_ENABLE_QT"
then
MOZ_ARG_WITH_STRING(qtdir,
[ --with-qtdir=\$dir Specify Qt directory ],
[ QTDIR=$withval])
if test -z "$QTDIR"; then
QTDIR="/usr"
fi
QTINCDIR="/include/qt"
if test ! -d "$QTDIR$QTINCDIR"; then
QTINCDIR="/include/X11/qt"
fi
if test ! -d "$QTDIR$QTINCDIR"; then
QTINCDIR="/include"
fi
if test -x "$QTDIR/bin/moc"; then
HOST_MOC="$QTDIR/bin/moc"
else
AC_CHECK_PROGS(HOST_MOC, moc, "")
fi
if test -z "$HOST_MOC"; then
AC_MSG_ERROR([no acceptable moc preprocessor found])
fi
MOC=$HOST_MOC
QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL"
if test -z "$MOZ_DEBUG"; then
QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG"
fi
_SAVE_LDFLAGS=$LDFLAGS
QT_LDFLAGS=-L${QTDIR}/lib
LDFLAGS="$LDFLAGS $QT_LDFLAGS"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_LIB(qt, main, QT_LIB=-lqt,
AC_CHECK_LIB(qt-mt, main, QT_LIB=-lqt-mt,
AC_MSG_ERROR([Cannot find QT libraries.])))
LDFLAGS=$_SAVE_LDFLAGS
QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11"
MOZ_QT_LDFLAGS=$QT_LIBS
MOZ_QT_CFLAGS=$QT_CFLAGS
_SAVE_CXXFLAGS=$CXXFLAGS
_SAVE_LIBS=$LIBS
CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
LIBS="$LIBS $QT_LIBS"
AC_MSG_CHECKING(Qt - version >= $QT_VERSION)
AC_TRY_COMPILE([#include <qglobal.h>],
[
#if (QT_VERSION < $QT_VERSION_NUM)
#error "QT_VERSION too old"
#endif
],result="yes",result="no")
AC_MSG_RESULT("$result")
if test "$result" = "no"; then
AC_MSG_ERROR([Qt Mozilla requires at least version $QT_VERSION of Qt])
fi
CXXFLAGS=$_SAVE_CXXFLAGS
LIBS=$_SAVE_LIBS
AC_LANG_RESTORE
fi
fi # COMPILE_ENVIRONMENT
AC_SUBST(MOZ_DEFAULT_TOOLKIT)
AC_SUBST(GTK_CONFIG)
AC_SUBST(TK_CFLAGS)
AC_SUBST(TK_LIBS)
AC_SUBST(MOZ_ENABLE_GTK)
AC_SUBST(MOZ_ENABLE_XLIB)
AC_SUBST(MOZ_ENABLE_GTK2)
AC_SUBST(MOZ_ENABLE_QT)
AC_SUBST(MOZ_ENABLE_PHOTON)
AC_SUBST(MOZ_ENABLE_COCOA)
AC_SUBST(MOZ_ENABLE_CAIRO_GFX)
AC_SUBST(MOZ_ENABLE_GLITZ)
AC_SUBST(MOZ_ENABLE_XREMOTE)
AC_SUBST(MOZ_GTK_CFLAGS)
AC_SUBST(MOZ_GTK_LDFLAGS)
AC_SUBST(MOZ_GTK2_CFLAGS)
AC_SUBST(MOZ_GTK2_LIBS)
AC_SUBST(MOZ_XLIB_CFLAGS)
AC_SUBST(MOZ_XLIB_LDFLAGS)
AC_SUBST(MOZ_QT_CFLAGS)
AC_SUBST(MOZ_QT_LDFLAGS)
AC_SUBST(MOC)
if test "$MOZ_ENABLE_CAIRO_GFX"
then
AC_DEFINE(MOZ_THEBES)
AC_DEFINE(MOZ_CAIRO_GFX)
fi
if test "$MOZ_ENABLE_GTK" \
|| test "$MOZ_ENABLE_QT" \
|| test "$MOZ_ENABLE_XLIB" \
|| test "$MOZ_ENABLE_GTK2"
then
AC_DEFINE(MOZ_X11)
MOZ_X11=1
fi
AC_SUBST(MOZ_X11)
dnl ========================================================
dnl =
dnl = Components & Features