28 |
|
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
29 |
|
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
30 |
|
AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes]) |
31 |
+ |
AC_ARG_ENABLE(standalone-gui,[ --enable-standalone-gui enable a standalone GUI prefs editor [default=no]], [WANT_STANDALONE_GUI=$enableval], [WANT_STANDALONE_GUI=no]) |
32 |
|
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
33 |
|
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], |
34 |
|
[case "$withval" in |
246 |
|
case "x$WANT_GTK" in |
247 |
|
xgtk2*) |
248 |
|
AM_PATH_GTK_2_0(1.3.15, [ |
249 |
< |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
250 |
< |
CFLAGS="$CFLAGS $GTK_CFLAGS" |
250 |
< |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
251 |
< |
LIBS="$LIBS $GTK_LIBS" |
252 |
< |
UISRCS=prefs_editor_gtk.cpp |
249 |
> |
GUI_CFLAGS="$GTK_CFLAGS" |
250 |
> |
GUI_LIBS="$GTK_LIBS" |
251 |
|
WANT_GTK=gtk2 |
252 |
|
], [ |
253 |
|
case "x${WANT_GTK}x" in |
265 |
|
esac |
266 |
|
if [[ "x$WANT_GTK" = "xgtk" ]]; then |
267 |
|
AM_PATH_GTK(1.2.0, [ |
268 |
< |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
269 |
< |
CFLAGS="$CFLAGS $GTK_CFLAGS" |
272 |
< |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
273 |
< |
LIBS="$LIBS $GTK_LIBS" |
274 |
< |
UISRCS=prefs_editor_gtk.cpp |
268 |
> |
GUI_CFLAGS="$GTK_CFLAGS" |
269 |
> |
GUI_LIBS="$GTK_LIBS" |
270 |
|
], [ |
271 |
|
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
272 |
|
WANT_GTK=no |
273 |
|
]) |
274 |
|
fi |
275 |
+ |
if [[ "x$WANT_GTK" != "xno" -a "x$WANT_STANDALONE_GUI" = "xno" ]]; then |
276 |
+ |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
277 |
+ |
UISRCS=prefs_editor_gtk.cpp |
278 |
+ |
fi |
279 |
+ |
AC_SUBST(GUI_CFLAGS) |
280 |
+ |
AC_SUBST(GUI_LIBS) |
281 |
+ |
|
282 |
+ |
dnl Build external GUI if requested. |
283 |
+ |
if [[ "$WANT_STANDALONE_GUI" != "yes" ]]; then |
284 |
+ |
WANT_STANDALONE_GUI=no |
285 |
+ |
fi |
286 |
+ |
if [[ "$WANT_GTK" = "no" ]]; then |
287 |
+ |
WANT_STANDALONE_GUI=no |
288 |
+ |
fi |
289 |
+ |
AC_SUBST(STANDALONE_GUI, [$WANT_STANDALONE_GUI]) |
290 |
|
|
291 |
|
dnl We use ESD if possible. |
292 |
|
if [[ "x$WANT_ESD" = "xyes" ]]; then |
442 |
|
) |
443 |
|
dnl (end of code from openssh-3.2.2p1 configure.ac) |
444 |
|
|
445 |
+ |
dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK) |
446 |
+ |
dnl doesn't work or is unimplemented. On these systems (mostly older |
447 |
+ |
dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4] |
448 |
+ |
AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O], |
449 |
+ |
ac_cv_nonblocking_io, [ |
450 |
+ |
case "$host" in |
451 |
+ |
*-*-osf*) |
452 |
+ |
ac_cv_nonblocking_io=FIONBIO |
453 |
+ |
;; |
454 |
+ |
*-*-sunos4*) |
455 |
+ |
ac_cv_nonblocking_io=FIONBIO |
456 |
+ |
;; |
457 |
+ |
*-*-ultrix*) |
458 |
+ |
ac_cv_nonblocking_io=FIONBIO |
459 |
+ |
;; |
460 |
+ |
*) |
461 |
+ |
ac_cv_nonblocking_io=O_NONBLOCK |
462 |
+ |
;; |
463 |
+ |
esac |
464 |
+ |
]) |
465 |
+ |
if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then |
466 |
+ |
AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used]) |
467 |
+ |
fi |
468 |
+ |
|
469 |
+ |
dnl Check whether compiler supports byte bit-fields |
470 |
+ |
AC_CACHE_CHECK([whether compiler supports byte bit-fields], |
471 |
+ |
ac_cv_have_byte_bitfields, [ |
472 |
+ |
AC_LANG_SAVE |
473 |
+ |
AC_LANG_CPLUSPLUS |
474 |
+ |
AC_TRY_RUN([ |
475 |
+ |
struct A { |
476 |
+ |
unsigned char b1:4; |
477 |
+ |
unsigned char b2:4; |
478 |
+ |
unsigned char c; |
479 |
+ |
unsigned short s; |
480 |
+ |
unsigned char a[4]; |
481 |
+ |
}; |
482 |
+ |
|
483 |
+ |
int main(void) { |
484 |
+ |
A a; |
485 |
+ |
return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1)); |
486 |
+ |
}], |
487 |
+ |
[ac_cv_have_byte_bitfields=yes], |
488 |
+ |
[ac_cv_have_byte_bitfields=no], |
489 |
+ |
dnl When cross-compiling, assume only GCC supports this |
490 |
+ |
[if [[ "$GCC" = "yes" ]]; then |
491 |
+ |
ac_cv_have_byte_bitfields="guessing yes" |
492 |
+ |
else |
493 |
+ |
ac_cv_have_byte_bitfields="guessing no" |
494 |
+ |
fi] |
495 |
+ |
) |
496 |
+ |
AC_LANG_RESTORE |
497 |
+ |
]) |
498 |
+ |
|
499 |
|
dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES) |
500 |
< |
AC_DEFUN(AC_CHECK_FRAMEWORK, [ |
500 |
> |
AC_DEFUN([AC_CHECK_FRAMEWORK], [ |
501 |
|
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl |
502 |
|
AC_CACHE_CHECK([whether compiler supports framework $1], |
503 |
|
ac_Framework, [ |
557 |
|
fi |
558 |
|
;; |
559 |
|
irix*) |
496 |
– |
ETHERSRC=ether_unix.cpp |
560 |
|
AUDIOSRC=Irix/audio_irix.cpp |
561 |
|
LIBS="$LIBS -laudio" |
562 |
|
WANT_ESD=no |
575 |
|
esac |
576 |
|
|
577 |
|
dnl Is the slirp library supported? |
578 |
< |
if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then |
578 |
> |
case "$ac_cv_have_byte_bitfields" in |
579 |
> |
yes|"guessing yes") |
580 |
> |
CAN_SLIRP=yes |
581 |
> |
ETHERSRC=ether_unix.cpp |
582 |
> |
;; |
583 |
> |
esac |
584 |
> |
if [[ -n "$CAN_SLIRP" ]]; then |
585 |
|
AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported]) |
586 |
|
SLIRP_SRCS="\ |
587 |
|
../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \ |
623 |
|
dnl $1 -- the macro to define |
624 |
|
dnl $2 -- the value to translate |
625 |
|
dnl $3 -- template name |
626 |
< |
AC_DEFUN(AC_TRANSLATE_DEFINE, [ |
626 |
> |
AC_DEFUN([AC_TRANSLATE_DEFINE], [ |
627 |
|
if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then |
628 |
|
AC_DEFINE($1, 1, $3) |
629 |
|
fi |
1397 |
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
1398 |
|
case $host_cpu in |
1399 |
|
i?86) |
1400 |
< |
DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2" |
1400 |
> |
DYNGEN_OP_FLAGS="-fomit-frame-pointer" |
1401 |
|
;; |
1402 |
|
mips) |
1403 |
|
DYNGEN_OP_FLAGS="-fno-delayed-branch -mno-abicalls" |