14 |
|
dnl cores for the configure tests since some are intended to dump core. |
15 |
|
ulimit -c 0 |
16 |
|
|
17 |
+ |
AC_ARG_ENABLE(standalone-gui,[ --enable-standalone-gui enable a standalone GUI prefs editor [default=no]], [WANT_STANDALONE_GUI=$enableval], [WANT_STANDALONE_GUI=no]) |
18 |
+ |
|
19 |
|
dnl Video options. |
20 |
|
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
21 |
|
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
253 |
|
case "x$WANT_GTK" in |
254 |
|
xgtk2*) |
255 |
|
AM_PATH_GTK_2_0(1.3.15, [ |
256 |
< |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
257 |
< |
CFLAGS="$CFLAGS $GTK_CFLAGS" |
256 |
< |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
257 |
< |
LIBS="$LIBS $GTK_LIBS" |
258 |
< |
UISRCS=prefs_editor_gtk.cpp |
256 |
> |
GUI_CFLAGS="$GTK_CFLAGS" |
257 |
> |
GUI_LIBS="$GTK_LIBS" |
258 |
|
WANT_GTK=gtk2 |
259 |
|
], [ |
260 |
|
case "x${WANT_GTK}x" in |
272 |
|
esac |
273 |
|
if [[ "x$WANT_GTK" = "xgtk" ]]; then |
274 |
|
AM_PATH_GTK(1.2.0, [ |
275 |
< |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
276 |
< |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
278 |
< |
LIBS="$LIBS $GTK_LIBS" |
279 |
< |
UISRCS=prefs_editor_gtk.cpp |
275 |
> |
GUI_CFLAGS="$GTK_CFLAGS" |
276 |
> |
GUI_LIBS="$GTK_LIBS" |
277 |
|
dnl somehow, <gnome-i18n.h> would redefine gettext() to nothing if |
278 |
|
dnl ENABLE_NLS is not set, thusly conflicting with C++ <string> which |
279 |
|
dnl includes <libintl.h> |
280 |
|
AM_GNU_GETTEXT |
281 |
|
B2_PATH_GNOMEUI([ |
282 |
|
AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.]) |
283 |
< |
CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS" |
284 |
< |
LIBS="$LIBS $GNOMEUI_LIBS" |
283 |
> |
GUI_CFLAGS="$GUI_CFLAGS $GNOMEUI_CFLAGS" |
284 |
> |
GUI_LIBS="$GUI_LIBS $GNOMEUI_LIBS" |
285 |
|
], []) |
286 |
|
], [ |
287 |
|
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
288 |
|
WANT_GTK=no |
289 |
|
]) |
290 |
|
fi |
291 |
+ |
if [[ "x$WANT_GTK" != "xno" -a "x$WANT_STANDALONE_GUI" = "xno" ]]; then |
292 |
+ |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
293 |
+ |
UISRCS=prefs_editor_gtk.cpp |
294 |
+ |
fi |
295 |
+ |
AC_SUBST(GUI_CFLAGS) |
296 |
+ |
AC_SUBST(GUI_LIBS) |
297 |
+ |
|
298 |
+ |
dnl Build external GUI if requested. |
299 |
+ |
if [[ "$WANT_STANDALONE_GUI" != "yes" ]]; then |
300 |
+ |
WANT_STANDALONE_GUI=no |
301 |
+ |
fi |
302 |
+ |
if [[ "$WANT_GTK" = "no" ]]; then |
303 |
+ |
WANT_STANDALONE_GUI=no |
304 |
+ |
fi |
305 |
+ |
AC_SUBST(STANDALONE_GUI, [$WANT_STANDALONE_GUI]) |
306 |
|
|
307 |
|
dnl We use ESD if possible. |
308 |
|
if [[ "x$WANT_ESD" = "xyes" ]]; then |
507 |
|
]) |
508 |
|
|
509 |
|
dnl Check for some MacOS X frameworks |
510 |
+ |
AC_CHECK_FRAMEWORK(AppKit, []) |
511 |
|
AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>]) |
512 |
|
AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>]) |
513 |
|
AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>]) |
1113 |
|
case $target_os:$target_cpu in |
1114 |
|
linux*:i?86) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";; |
1115 |
|
linux*:x86_64) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";; |
1116 |
< |
darwin*:powerpc)LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";; |
1116 |
> |
linux*:powerpc) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-ppc.ld";; |
1117 |
> |
netbsd*:i?86) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";; |
1118 |
> |
freebsd*:i?86) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/freebsd-i386.ld";; |
1119 |
> |
darwin*:*) LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";; |
1120 |
|
esac |
1121 |
|
if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then |
1122 |
|
AC_CACHE_CHECK([whether linker script is usable], |