ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure
(Generate patch)

Comparing rxvt-unicode/configure (file contents):
Revision 1.142 by sf-exg, Tue Jan 4 10:03:18 2011 UTC vs.
Revision 1.150 by root, Sun Dec 18 02:23:11 2011 UTC

601PERL 601PERL
602XFT_CONFIG 602XFT_CONFIG
603AFTERIMAGE_LIBS 603AFTERIMAGE_LIBS
604AFTERIMAGE_CFLAGS 604AFTERIMAGE_CFLAGS
605afterimage_config 605afterimage_config
606STARTUP_NOTIFICATION_LIBS
607STARTUP_NOTIFICATION_CFLAGS
606PIXBUF_LIBS 608PIXBUF_LIBS
607PIXBUF_CFLAGS 609PIXBUF_CFLAGS
608PKG_CONFIG 610PKG_CONFIG
609X_EXTRA_LIBS 611X_EXTRA_LIBS
610X_LIBS 612X_LIBS
691enable_xft 693enable_xft
692enable_font_styles 694enable_font_styles
693enable_afterimage 695enable_afterimage
694with_afterimage_config 696with_afterimage_config
695enable_pixbuf 697enable_pixbuf
698enable_startup_notification
696enable_transparency 699enable_transparency
697enable_fading 700enable_fading
698enable_rxvt_scroll 701enable_rxvt_scroll
699enable_next_scroll 702enable_next_scroll
700enable_xterm_scroll 703enable_xterm_scroll
1364 --enable-256-color enable 256-color support 1367 --enable-256-color enable 256-color support
1365 --enable-unicode3 use 21 instead of 16 bits to represent unicode characters 1368 --enable-unicode3 use 21 instead of 16 bits to represent unicode characters
1366 --enable-combining enable composition of base and combining characters 1369 --enable-combining enable composition of base and combining characters
1367 --enable-xft enable xft support on systems that have it 1370 --enable-xft enable xft support on systems that have it
1368 --enable-font-styles enable bold and italic support 1371 --enable-font-styles enable bold and italic support
1369 --enable-afterimage enable integration with libAfterImage for background images 1372 --enable-afterimage enable integration with libAfterImage for background images (deprecated)
1370 --enable-pixbuf enable integration with gdk-pixbuf for background images 1373 --enable-pixbuf enable integration with gdk-pixbuf for background images
1374 --enable-startup-notification enable freedesktop startup notification support
1371 --enable-transparency enable transparent backgrounds 1375 --enable-transparency enable transparent backgrounds
1372 --enable-fading enable colors fading when off focus 1376 --enable-fading enable colors fading when off focus
1373 --enable-rxvt-scroll enable rxvt style scrollbar 1377 --enable-rxvt-scroll enable rxvt style scrollbar
1374 --enable-next-scroll enable NeXT style scrollbar 1378 --enable-next-scroll enable NeXT style scrollbar
1375 --enable-xterm-scroll enable Xterm style scrollbar 1379 --enable-xterm-scroll enable Xterm style scrollbar
4665support_scroll_rxvt=yes 4669support_scroll_rxvt=yes
4666support_scroll_next=yes 4670support_scroll_next=yes
4667support_scroll_xterm=yes 4671support_scroll_xterm=yes
4668support_xim=yes 4672support_xim=yes
4669support_pixbuf=yes 4673support_pixbuf=yes
4670support_afterimage=yes 4674support_startup_notification=yes
4671support_xft=yes 4675support_xft=yes
4672support_unicode3=no 4676support_unicode3=no
4673support_combining=yes 4677support_combining=yes
4674support_8bitctrls=no 4678support_8bitctrls=no
4675support_iso14755=yes 4679support_iso14755=yes
4697 support_scroll_xterm=no 4701 support_scroll_xterm=no
4698 support_utmp=no 4702 support_utmp=no
4699 support_wtmp=no 4703 support_wtmp=no
4700 support_xim=no 4704 support_xim=no
4701 support_pixbuf=no 4705 support_pixbuf=no
4702 support_afterimage=no 4706 support_startup_notification=no
4703 support_xft=no 4707 support_xft=no
4704 support_unicode3=no 4708 support_unicode3=no
4705 support_combining=no 4709 support_combining=no
4706 support_8bitctrls=no 4710 support_8bitctrls=no
4707 support_iso14755=no 4711 support_iso14755=no
4725 support_scroll_xterm=yes 4729 support_scroll_xterm=yes
4726 support_utmp=yes 4730 support_utmp=yes
4727 support_wtmp=yes 4731 support_wtmp=yes
4728 support_xim=yes 4732 support_xim=yes
4729 support_pixbuf=yes 4733 support_pixbuf=yes
4730 support_afterimage=yes 4734 support_startup_notification=yes
4731 support_xft=yes 4735 support_xft=yes
4732 support_unicode3=yes 4736 support_unicode3=yes
4733 support_combining=yes 4737 support_combining=yes
4734 #support_8bitctrls=yes 4738 #support_8bitctrls=yes
4735 support_iso14755=yes 4739 support_iso14755=yes
4739 fi 4743 fi
4740 4744
4741fi 4745fi
4742 4746
4743 4747
4744ASSERTIONS=no 4748support_assertions=no
4745# Check whether --enable-assert was given. 4749# Check whether --enable-assert was given.
4746if test "${enable_assert+set}" = set; then : 4750if test "${enable_assert+set}" = set; then :
4747 enableval=$enable_assert; if test x$enableval = xyes; then 4751 enableval=$enable_assert; if test x$enableval = xyes; then
4748 ASSERTIONS=yes 4752 support_assertions=yes
4749 fi 4753 fi
4750fi 4754fi
4751 4755
4752if test x$ASSERTIONS = xno; then 4756if test x$support_assertions = xno; then
4753 4757
4754$as_echo "#define NDEBUG 1" >>confdefs.h 4758$as_echo "#define NDEBUG 1" >>confdefs.h
4755 4759
4756fi 4760fi
4757 4761
4758WARNINGS=no 4762support_warnings=no
4759# Check whether --enable-warnings was given. 4763# Check whether --enable-warnings was given.
4760if test "${enable_warnings+set}" = set; then : 4764if test "${enable_warnings+set}" = set; then :
4761 enableval=$enable_warnings; if test x$enableval = xyes; then 4765 enableval=$enable_warnings; if test x$enableval = xyes; then
4762 WARNINGS=yes 4766 support_warnings=yes
4763 fi 4767 fi
4764fi 4768fi
4765 4769
4766if test x$GXX = xyes; then 4770if test x$GXX = xyes; then
4767 if test $WARNINGS = yes; then 4771 if test $support_warnings = yes; then
4768 save_CXXFLAGS="$CXXFLAGS" 4772 save_CXXFLAGS="$CXXFLAGS"
4769 CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" 4773 CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-unused-value"
4770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4771/* end confdefs.h. */ 4775/* end confdefs.h. */
4772 4776
4773int 4777int
4774main () 4778main ()
4854 4858
4855# Check whether --enable-pixbuf was given. 4859# Check whether --enable-pixbuf was given.
4856if test "${enable_pixbuf+set}" = set; then : 4860if test "${enable_pixbuf+set}" = set; then :
4857 enableval=$enable_pixbuf; if test x$enableval = xyes -o x$enableval = xno; then 4861 enableval=$enable_pixbuf; if test x$enableval = xyes -o x$enableval = xno; then
4858 support_pixbuf=$enableval 4862 support_pixbuf=$enableval
4863 fi
4864fi
4865
4866
4867# Check whether --enable-startup-notification was given.
4868if test "${enable_startup_notification+set}" = set; then :
4869 enableval=$enable_startup_notification; if test x$enableval = xyes -o x$enableval = xno; then
4870 support_startup_notification=$enableval
4859 fi 4871 fi
4860fi 4872fi
4861 4873
4862 4874
4863# Check whether --enable-transparency was given. 4875# Check whether --enable-transparency was given.
5293 5305
5294fi 5306fi
5295done 5307done
5296 5308
5297 5309
5310for ac_func in clock_gettime
5311do :
5298ac_fn_cxx_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" 5312 ac_fn_cxx_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
5299if test "x$ac_cv_func_clock_gettime" = x""yes; then : 5313if test "x$ac_cv_func_clock_gettime" = x""yes; then :
5314 cat >>confdefs.h <<_ACEOF
5315#define HAVE_CLOCK_GETTIME 1
5316_ACEOF
5300 5317
5301else 5318else
5302 5319
5303 if test $(uname) = Linux; then 5320 if test $(uname) = Linux; then
5304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5 5321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5
5389done 5406done
5390 5407
5391 fi 5408 fi
5392 5409
5393fi 5410fi
5411done
5394 5412
5395 5413
5414for ac_func in nanosleep
5415do :
5396ac_fn_cxx_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" 5416 ac_fn_cxx_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
5397if test "x$ac_cv_func_nanosleep" = x""yes; then : 5417if test "x$ac_cv_func_nanosleep" = x""yes; then :
5418 cat >>confdefs.h <<_ACEOF
5419#define HAVE_NANOSLEEP 1
5420_ACEOF
5398 5421
5399else 5422else
5400 5423
5401 if test -z "$LIBEV_M4_AVOID_LIBRT"; then 5424 if test -z "$LIBEV_M4_AVOID_LIBRT"; then
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 5425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
5457done 5480done
5458 5481
5459 fi 5482 fi
5460 5483
5461fi 5484fi
5485done
5462 5486
5463 5487
5488if test -z "$LIBEV_M4_AVOID_LIBM"; then
5489 LIBM=m
5490fi
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 5491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5
5465$as_echo_n "checking for ceil in -lm... " >&6; } 5492$as_echo_n "checking for library containing floor... " >&6; }
5466if test "${ac_cv_lib_m_ceil+set}" = set; then : 5493if test "${ac_cv_search_floor+set}" = set; then :
5467 $as_echo_n "(cached) " >&6 5494 $as_echo_n "(cached) " >&6
5468else 5495else
5469 ac_check_lib_save_LIBS=$LIBS 5496 ac_func_search_save_LIBS=$LIBS
5470LIBS="-lm $LIBS"
5471cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5472/* end confdefs.h. */ 5498/* end confdefs.h. */
5473 5499
5474/* Override any GCC internal prototype to avoid an error. 5500/* Override any GCC internal prototype to avoid an error.
5475 Use char because int might match the return type of a GCC 5501 Use char because int might match the return type of a GCC
5476 builtin and then its argument prototype would still apply. */ 5502 builtin and then its argument prototype would still apply. */
5477#ifdef __cplusplus 5503#ifdef __cplusplus
5478extern "C" 5504extern "C"
5479#endif 5505#endif
5480char ceil (); 5506char floor ();
5481int 5507int
5482main () 5508main ()
5483{ 5509{
5484return ceil (); 5510return floor ();
5485 ; 5511 ;
5486 return 0; 5512 return 0;
5487} 5513}
5488_ACEOF 5514_ACEOF
5515for ac_lib in '' $LIBM; do
5516 if test -z "$ac_lib"; then
5517 ac_res="none required"
5518 else
5519 ac_res=-l$ac_lib
5520 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5521 fi
5489if ac_fn_cxx_try_link "$LINENO"; then : 5522 if ac_fn_cxx_try_link "$LINENO"; then :
5490 ac_cv_lib_m_ceil=yes 5523 ac_cv_search_floor=$ac_res
5491else
5492 ac_cv_lib_m_ceil=no
5493fi 5524fi
5494rm -f core conftest.err conftest.$ac_objext \ 5525rm -f core conftest.err conftest.$ac_objext \
5495 conftest$ac_exeext conftest.$ac_ext 5526 conftest$ac_exeext
5496LIBS=$ac_check_lib_save_LIBS 5527 if test "${ac_cv_search_floor+set}" = set; then :
5528 break
5497fi 5529fi
5530done
5531if test "${ac_cv_search_floor+set}" = set; then :
5532
5533else
5534 ac_cv_search_floor=no
5535fi
5536rm conftest.$ac_ext
5537LIBS=$ac_func_search_save_LIBS
5538fi
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 5539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5
5499$as_echo "$ac_cv_lib_m_ceil" >&6; } 5540$as_echo "$ac_cv_search_floor" >&6; }
5500if test "x$ac_cv_lib_m_ceil" = x""yes; then : 5541ac_res=$ac_cv_search_floor
5501 cat >>confdefs.h <<_ACEOF 5542if test "$ac_res" != no; then :
5502#define HAVE_LIBM 1 5543 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5503_ACEOF
5504 5544
5505 LIBS="-lm $LIBS" 5545$as_echo "#define HAVE_FLOOR 1" >>confdefs.h
5506 5546
5507fi 5547fi
5508 5548
5509 5549
5510 5550
6310fi 6350fi
6311 6351
6312 6352
6313 6353
6314 6354
6355STARTUP_NOTIFICATION_CFLAGS=
6356STARTUP_NOTIFICATION_LIBS=
6357
6358if test x$support_startup_notification = xyes; then
6359 support_startup_notification=no
6360 # Extract the first word of "pkg-config", so it can be a program name with args.
6361set dummy pkg-config; ac_word=$2
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6363$as_echo_n "checking for $ac_word... " >&6; }
6364if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
6365 $as_echo_n "(cached) " >&6
6366else
6367 case $PKG_CONFIG in
6368 [\\/]* | ?:[\\/]*)
6369 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6370 ;;
6371 *)
6372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6373for as_dir in $PATH
6374do
6375 IFS=$as_save_IFS
6376 test -z "$as_dir" && as_dir=.
6377 for ac_exec_ext in '' $ac_executable_extensions; do
6378 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6379 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6381 break 2
6382 fi
6383done
6384 done
6385IFS=$as_save_IFS
6386
6387 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6388 ;;
6389esac
6390fi
6391PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6392if test -n "$PKG_CONFIG"; then
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6394$as_echo "$PKG_CONFIG" >&6; }
6395else
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6397$as_echo "no" >&6; }
6398fi
6399
6400
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstartup-notification" >&5
6402$as_echo_n "checking for libstartup-notification... " >&6; }
6403 if test $PKG_CONFIG != no && $PKG_CONFIG --exists libstartup-notification-1.0; then
6404 STARTUP_NOTIFICATION_CFLAGS="`$PKG_CONFIG libstartup-notification-1.0 --cflags`"
6405 STARTUP_NOTIFICATION_LIBS="`$PKG_CONFIG libstartup-notification-1.0 --libs`"
6406 support_startup_notification=yes
6407 fi
6408
6409 if test x$support_startup_notification = xyes; then
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6411$as_echo "ok" >&6; }
6412
6413$as_echo "#define HAVE_STARTUP_NOTIFICATION 1" >>confdefs.h
6414
6415 else
6416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418 fi
6419fi
6420
6421
6422
6423
6315AFTERIMAGE_CFLAGS= 6424AFTERIMAGE_CFLAGS=
6316AFTERIMAGE_LIBS= 6425AFTERIMAGE_LIBS=
6317AFTERIMAGE_VERSION=
6318 6426
6319if test x$support_afterimage = xyes; then 6427if test x$support_afterimage = xyes; then
6320 support_afterimage=no 6428 support_afterimage=no
6321 6429
6322 if test "x$afterimage_config" = "x" ; then 6430 if test "x$afterimage_config" = "x" ; then
6363 6471
6364 fi 6472 fi
6365 if test "x$afterimage_config" != "xno" ; then 6473 if test "x$afterimage_config" != "xno" ; then
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libAfterImage version >= 1.15" >&5 6474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libAfterImage version >= 1.15" >&5
6367$as_echo_n "checking for libAfterImage version >= 1.15... " >&6; } 6475$as_echo_n "checking for libAfterImage version >= 1.15... " >&6; }
6368 xAFTERIMAGE_VERSION=`$afterimage_config --version` 6476 AFTERIMAGE_VERSION=`$afterimage_config --version`
6369 if test -n "$xAFTERIMAGE_VERSION" ; then 6477 if test -n "$AFTERIMAGE_VERSION" ; then
6370 xAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` 6478 AFTERIMAGE_CFLAGS=`$afterimage_config --cflags`
6371 xAFTERIMAGE_LIBS=`$afterimage_config --libs` 6479 AFTERIMAGE_LIBS=`$afterimage_config --libs`
6372 if test "x$xAFTERIMAGE_LIBS" != "x"; then 6480 if test "x$AFTERIMAGE_LIBS" != "x"; then
6373 libai_ver_major=`echo $xAFTERIMAGE_VERSION | cut -f 1 -d .` 6481 libai_ver_major=`echo $AFTERIMAGE_VERSION | cut -f 1 -d .`
6374 libai_ver_minor=`echo $xAFTERIMAGE_VERSION | cut -f 2 -d .` 6482 libai_ver_minor=`echo $AFTERIMAGE_VERSION | cut -f 2 -d .`
6375 if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then 6483 if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then
6376 support_afterimage=yes 6484 support_afterimage=yes
6377 AFTERIMAGE_CFLAGS="$xAFTERIMAGE_CFLAGS"
6378 AFTERIMAGE_LIBS="$xAFTERIMAGE_LIBS"
6379 AFTERIMAGE_VERSION="$xAFTERIMAGE_VERSION"
6380 fi 6485 fi
6381 fi 6486 fi
6382 fi 6487 fi
6383 if test "x$support_afterimage" = "xyes"; then 6488 if test "x$support_afterimage" = "xyes"; then
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AFTERIMAGE_LIBS" >&5 6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AFTERIMAGE_LIBS" >&5
6391$as_echo "#define BG_IMAGE_FROM_FILE 1" >>confdefs.h 6496$as_echo "#define BG_IMAGE_FROM_FILE 1" >>confdefs.h
6392 6497
6393 else 6498 else
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395$as_echo "no" >&6; } 6500$as_echo "no" >&6; }
6501 AFTERIMAGE_CFLAGS=
6502 AFTERIMAGE_LIBS=
6396 fi 6503 fi
6397 fi 6504 fi
6398fi 6505fi
6399 6506
6400 6507
6420fi 6527fi
6421 6528
6422done 6529done
6423 6530
6424 6531
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPointer" >&5
6426$as_echo_n "checking for XPointer... " >&6; }
6427if test "${rxvt_cv_xpointer+set}" = set; then :
6428 $as_echo_n "(cached) " >&6
6429else
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431/* end confdefs.h. */
6432#include <X11/Xlib.h>
6433int
6434main ()
6435{
6436XPointer dummy;
6437 ;
6438 return 0;
6439}
6440_ACEOF
6441if ac_fn_cxx_try_compile "$LINENO"; then :
6442 rxvt_cv_xpointer=yes
6443else
6444 rxvt_cv_xpointer=no
6445fi
6446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6447fi
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rxvt_cv_xpointer" >&5
6449$as_echo "$rxvt_cv_xpointer" >&6; }
6450if test x$rxvt_cv_xpointer = xyes; then
6451
6452$as_echo "#define HAVE_XPOINTER 1" >>confdefs.h
6453
6454fi
6455
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB_ILLEGAL_ACCESS" >&5 6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB_ILLEGAL_ACCESS" >&5
6457$as_echo_n "checking for XLIB_ILLEGAL_ACCESS... " >&6; } 6533$as_echo_n "checking for XLIB_ILLEGAL_ACCESS... " >&6; }
6458if test "${rxvt_cv_xlib_illegal_access+set}" = set; then : 6534if test "${rxvt_cv_xlib_illegal_access+set}" = set; then :
6459 $as_echo_n "(cached) " >&6 6535 $as_echo_n "(cached) " >&6
6460else 6536else
6685 ac_fn_cxx_check_header_mongrel "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default" 6761 ac_fn_cxx_check_header_mongrel "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
6686if test "x$ac_cv_header_utmp_h" = x""yes; then : 6762if test "x$ac_cv_header_utmp_h" = x""yes; then :
6687 cat >>confdefs.h <<_ACEOF 6763 cat >>confdefs.h <<_ACEOF
6688#define HAVE_UTMP_H 1 6764#define HAVE_UTMP_H 1
6689_ACEOF 6765_ACEOF
6766 ac_fn_cxx_check_type "$LINENO" "struct utmp" "ac_cv_type_struct_utmp" "
6767#include <sys/types.h>
6768#include <utmp.h>
6769
6770"
6771if test "x$ac_cv_type_struct_utmp" = x""yes; then :
6772
6773cat >>confdefs.h <<_ACEOF
6774#define HAVE_STRUCT_UTMP 1
6775_ACEOF
6776
6777
6778fi
6779
6780
6781
6782# ac_fn_cxx_check_member LINENO AGGR MEMBER VAR INCLUDES
6783# ------------------------------------------------------
6784# Tries to find if the field MEMBER exists in type AGGR, after including
6785# INCLUDES, setting cache variable VAR accordingly.
6786ac_fn_cxx_check_member ()
6787{
6788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utmp" >&5 6789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
6691$as_echo_n "checking for struct utmp... " >&6; } 6790$as_echo_n "checking for $2.$3... " >&6; }
6692if test "${pt_cv_struct_utmp+set}" = set; then : 6791if eval "test \"\${$4+set}\"" = set; then :
6693 $as_echo_n "(cached) " >&6 6792 $as_echo_n "(cached) " >&6
6694else 6793else
6695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6696/* end confdefs.h. */ 6795/* end confdefs.h. */
6697#include <sys/types.h> 6796$5
6698#include <utmp.h>
6699int 6797int
6700main () 6798main ()
6701{ 6799{
6702struct utmp ut; 6800static $2 ac_aggr;
6801if (ac_aggr.$3)
6802return 0;
6703 ; 6803 ;
6704 return 0; 6804 return 0;
6705} 6805}
6706_ACEOF 6806_ACEOF
6707if ac_fn_cxx_try_compile "$LINENO"; then : 6807if ac_fn_cxx_try_compile "$LINENO"; then :
6708 pt_cv_struct_utmp=yes 6808 eval "$4=yes"
6709else
6710 pt_cv_struct_utmp=no
6711fi
6712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6713fi
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_utmp" >&5
6715$as_echo "$pt_cv_struct_utmp" >&6; }
6716if test x$pt_cv_struct_utmp = xyes; then
6717
6718$as_echo "#define HAVE_STRUCT_UTMP 1" >>confdefs.h
6719
6720fi
6721
6722
6723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host in utmp struct" >&5
6724$as_echo_n "checking for ut_host in utmp struct... " >&6; }
6725if test "${pt_cv_struct_utmp_host+set}" = set; then :
6726 $as_echo_n "(cached) " >&6
6727else 6809else
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729/* end confdefs.h. */ 6811/* end confdefs.h. */
6730#include <sys/types.h> 6812$5
6731#include <utmp.h>
6732int 6813int
6733main () 6814main ()
6734{ 6815{
6735struct utmp ut; ut.ut_host; 6816static $2 ac_aggr;
6817if (sizeof ac_aggr.$3)
6818return 0;
6736 ; 6819 ;
6737 return 0; 6820 return 0;
6738} 6821}
6739_ACEOF 6822_ACEOF
6740if ac_fn_cxx_try_compile "$LINENO"; then : 6823if ac_fn_cxx_try_compile "$LINENO"; then :
6741 pt_cv_struct_utmp_host=yes 6824 eval "$4=yes"
6742else 6825else
6743 pt_cv_struct_utmp_host=no 6826 eval "$4=no"
6744fi 6827fi
6745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6746fi 6829fi
6830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6831fi
6832eval ac_res=\$$4
6747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_utmp_host" >&5 6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6748$as_echo "$pt_cv_struct_utmp_host" >&6; } 6834$as_echo "$ac_res" >&6; }
6749if test x$pt_cv_struct_utmp_host = xyes; then 6835 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
6750 6836
6751$as_echo "#define HAVE_UTMP_HOST 1" >>confdefs.h 6837} # ac_fn_cxx_check_member
6752 6838ac_fn_cxx_check_member "$LINENO" "struct utmp" "ut_host" "ac_cv_member_struct_utmp_ut_host" "
6753fi
6754
6755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid in utmp struct" >&5
6756$as_echo_n "checking for ut_pid in utmp struct... " >&6; }
6757if test "${pt_cv_struct_utmp_pid+set}" = set; then :
6758 $as_echo_n "(cached) " >&6
6759else
6760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761/* end confdefs.h. */
6762#include <sys/types.h> 6839#include <sys/types.h>
6763#include <utmp.h> 6840#include <utmp.h>
6764int 6841
6765main () 6842"
6766{ 6843if test "x$ac_cv_member_struct_utmp_ut_host" = x""yes; then :
6767struct utmp ut; ut.ut_pid; 6844
6768 ; 6845$as_echo "#define HAVE_UTMP_HOST 1" >>confdefs.h
6769 return 0; 6846
6770}
6771_ACEOF
6772if ac_fn_cxx_try_compile "$LINENO"; then :
6773 pt_cv_struct_utmp_pid=yes
6774else
6775 pt_cv_struct_utmp_pid=no
6776fi 6847fi
6777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6848
6778fi 6849
6779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_utmp_pid" >&5 6850ac_fn_cxx_check_member "$LINENO" "struct utmp" "ut_pid" "ac_cv_member_struct_utmp_ut_pid" "
6780$as_echo "$pt_cv_struct_utmp_pid" >&6; } 6851#include <sys/types.h>
6852#include <utmp.h>
6853
6854"
6781if test x$pt_cv_struct_utmp_pid = xyes; then 6855if test "x$ac_cv_member_struct_utmp_ut_pid" = x""yes; then :
6782 6856
6783$as_echo "#define HAVE_UTMP_PID 1" >>confdefs.h 6857$as_echo "#define HAVE_UTMP_PID 1" >>confdefs.h
6784 6858
6785fi 6859fi
6860
6786 6861
6787fi 6862fi
6788 6863
6789done 6864done
6790 6865
6794 ac_fn_cxx_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default" 6869 ac_fn_cxx_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
6795if test "x$ac_cv_header_utmpx_h" = x""yes; then : 6870if test "x$ac_cv_header_utmpx_h" = x""yes; then :
6796 cat >>confdefs.h <<_ACEOF 6871 cat >>confdefs.h <<_ACEOF
6797#define HAVE_UTMPX_H 1 6872#define HAVE_UTMPX_H 1
6798_ACEOF 6873_ACEOF
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utmpx" >&5 6874 ac_fn_cxx_check_type "$LINENO" "struct utmpx" "ac_cv_type_struct_utmpx" "
6800$as_echo_n "checking for struct utmpx... " >&6; }
6801if test "${pt_cv_struct_utmpx+set}" = set; then :
6802 $as_echo_n "(cached) " >&6
6803else
6804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805/* end confdefs.h. */
6806#include <sys/types.h> 6875#include <sys/types.h>
6807#include <utmpx.h> 6876#include <utmpx.h>
6808int 6877
6809main () 6878"
6810{
6811struct utmpx ut;
6812 ;
6813 return 0;
6814}
6815_ACEOF
6816if ac_fn_cxx_try_compile "$LINENO"; then :
6817 pt_cv_struct_utmpx=yes
6818else
6819 pt_cv_struct_utmpx=no
6820fi
6821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6822fi
6823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_utmpx" >&5
6824$as_echo "$pt_cv_struct_utmpx" >&6; }
6825if test x$pt_cv_struct_utmpx = xyes; then 6879if test "x$ac_cv_type_struct_utmpx" = x""yes; then :
6826 6880
6827$as_echo "#define HAVE_STRUCT_UTMPX 1" >>confdefs.h 6881cat >>confdefs.h <<_ACEOF
6882#define HAVE_STRUCT_UTMPX 1
6883_ACEOF
6828 6884
6829fi
6830 6885
6886fi
6831 6887
6832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for host in utmpx struct" >&5 6888
6833$as_echo_n "checking for host in utmpx struct... " >&6; } 6889ac_fn_cxx_check_member "$LINENO" "struct utmpx" "ut_host" "ac_cv_member_struct_utmpx_ut_host" "
6834if test "${pt_cv_struct_utmpx_host+set}" = set; then :
6835 $as_echo_n "(cached) " >&6
6836else
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838/* end confdefs.h. */
6839#include <sys/types.h> 6890#include <sys/types.h>
6840#include <utmpx.h> 6891#include <utmpx.h>
6841int 6892
6842main () 6893"
6843{
6844struct utmpx utx; utx.ut_host;
6845 ;
6846 return 0;
6847}
6848_ACEOF
6849if ac_fn_cxx_try_compile "$LINENO"; then :
6850 pt_cv_struct_utmpx_host=yes
6851else
6852 pt_cv_struct_utmpx_host=no
6853fi
6854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6855fi
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_utmpx_host" >&5
6857$as_echo "$pt_cv_struct_utmpx_host" >&6; }
6858if test x$pt_cv_struct_utmpx_host = xyes; then 6894if test "x$ac_cv_member_struct_utmpx_ut_host" = x""yes; then :
6859 6895
6860$as_echo "#define HAVE_UTMPX_HOST 1" >>confdefs.h 6896$as_echo "#define HAVE_UTMPX_HOST 1" >>confdefs.h
6861 6897
6862fi 6898fi
6863 6899
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for session in utmpx struct" >&5 6900
6865$as_echo_n "checking for session in utmpx struct... " >&6; } 6901ac_fn_cxx_check_member "$LINENO" "struct utmpx" "ut_session" "ac_cv_member_struct_utmpx_ut_session" "
6866if test "${pt_cv_struct_utmpx_session+set}" = set; then :
6867 $as_echo_n "(cached) " >&6
6868else
6869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6870/* end confdefs.h. */
6871#include <sys/types.h> 6902#include <sys/types.h>
6872#include <utmpx.h> 6903#include <utmpx.h>
6873int 6904
6874main () 6905"
6875{
6876struct utmpx utx; utx.ut_session;
6877 ;
6878 return 0;
6879}
6880_ACEOF
6881if ac_fn_cxx_try_compile "$LINENO"; then :
6882 pt_cv_struct_utmpx_session=yes
6883else
6884 pt_cv_struct_utmpx_session=no
6885fi
6886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6887fi
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_utmpx_session" >&5
6889$as_echo "$pt_cv_struct_utmpx_session" >&6; }
6890if test x$pt_cv_struct_utmpx_session = xyes; then 6906if test "x$ac_cv_member_struct_utmpx_ut_session" = x""yes; then :
6891 6907
6892$as_echo "#define HAVE_UTMPX_SESSION 1" >>confdefs.h 6908$as_echo "#define HAVE_UTMPX_SESSION 1" >>confdefs.h
6893 6909
6894fi 6910fi
6895 6911
6912
6896fi 6913fi
6897 6914
6898done 6915done
6899 6916
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lastlog" >&5 6917ac_fn_cxx_check_type "$LINENO" "struct lastlog" "ac_cv_type_struct_lastlog" "
6901$as_echo_n "checking for struct lastlog... " >&6; }
6902if test "${pt_cv_struct_lastlog+set}" = set; then :
6903 $as_echo_n "(cached) " >&6
6904else
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906/* end confdefs.h. */
6907#include <sys/types.h> 6918#include <sys/types.h>
6908#include <utmp.h> 6919#include <utmp.h>
6909#ifdef HAVE_LASTLOG_H 6920#ifdef HAVE_LASTLOG_H
6910#include <lastlog.h> 6921#include <lastlog.h>
6911#endif 6922#endif
6912 6923
6913int 6924"
6914main ()
6915{
6916struct lastlog ll;
6917 ;
6918 return 0;
6919}
6920_ACEOF
6921if ac_fn_cxx_try_compile "$LINENO"; then :
6922 pt_cv_struct_lastlog=yes
6923else
6924 pt_cv_struct_lastlog=no
6925fi
6926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6927fi
6928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_lastlog" >&5
6929$as_echo "$pt_cv_struct_lastlog" >&6; }
6930if test x$pt_cv_struct_lastlog = xyes; then 6925if test "x$ac_cv_type_struct_lastlog" = x""yes; then :
6931 6926
6932$as_echo "#define HAVE_STRUCT_LASTLOG 1" >>confdefs.h 6927cat >>confdefs.h <<_ACEOF
6928#define HAVE_STRUCT_LASTLOG 1
6929_ACEOF
6933 6930
6934fi
6935 6931
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lastlogx" >&5 6932fi
6937$as_echo_n "checking for struct lastlogx... " >&6; } 6933
6938if test "${pt_cv_struct_lastlogx+set}" = set; then : 6934
6939 $as_echo_n "(cached) " >&6 6935ac_fn_cxx_check_type "$LINENO" "struct lastlogx" "ac_cv_type_struct_lastlogx" "
6940else
6941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6942/* end confdefs.h. */
6943#include <sys/types.h> 6936#include <sys/types.h>
6944#include <utmpx.h> 6937#include <utmpx.h>
6945#ifdef HAVE_LASTLOG_H 6938#ifdef HAVE_LASTLOG_H
6946#include <lastlog.h> 6939#include <lastlog.h>
6947#endif 6940#endif
6948 6941
6949int 6942"
6950main ()
6951{
6952struct lastlogx ll;
6953 ;
6954 return 0;
6955}
6956_ACEOF
6957if ac_fn_cxx_try_compile "$LINENO"; then :
6958 pt_cv_struct_lastlogx=yes
6959else
6960 pt_cv_struct_lastlogx=no
6961fi
6962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6963fi
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_struct_lastlogx" >&5
6965$as_echo "$pt_cv_struct_lastlogx" >&6; }
6966if test x$pt_cv_struct_lastlogx = xyes; then 6943if test "x$ac_cv_type_struct_lastlogx" = x""yes; then :
6967 6944
6968$as_echo "#define HAVE_STRUCT_LASTLOGX 1" >>confdefs.h 6945cat >>confdefs.h <<_ACEOF
6946#define HAVE_STRUCT_LASTLOGX 1
6947_ACEOF
6969 6948
6970fi
6971 6949
6950fi
6972 6951
6952
6953
6973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where utmp is located" >&5 6954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback location of utmp" >&5
6974$as_echo_n "checking where utmp is located... " >&6; } 6955$as_echo_n "checking for a fallback location of utmp... " >&6; }
6975if test "${pt_cv_path_utmp+set}" = set; then : 6956if test "${pt_cv_path_utmp+set}" = set; then :
6976 $as_echo_n "(cached) " >&6 6957 $as_echo_n "(cached) " >&6
6977else 6958else
6959
6978 if test "$cross_compiling" = yes; then : 6960if test "$cross_compiling" != yes; then
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define UTMP_FILE in config.h manually" >&5
6980$as_echo "$as_me: WARNING: Define UTMP_FILE in config.h manually" >&2;}
6981else
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983/* end confdefs.h. */
6984#include <stdio.h>
6985#include <stdlib.h>
6986#include <sys/types.h>
6987#include <utmp.h>
6988#include <errno.h>
6989main()
6990{
6991 char **u, *utmplist[] = {
6992 "/var/run/utmp", "/var/adm/utmp", "/etc/utmp", "/usr/etc/utmp", "/usr/adm/utmp", NULL }; 6961 for file in "/var/run/utmp" "/var/adm/utmp" "/etc/utmp" "/usr/etc/utmp" "/usr/adm/utmp"; do
6993 FILE *a, *f=fopen("conftestval", "w"); 6962 if test -f "$file"; then
6994 if (!f) exit(1);
6995#ifdef UTMP_FILE
6996 fprintf(f, "%s\n", UTMP_FILE);
6997 exit(0);
6998#endif
6999#ifdef _PATH_UTMP
7000 fprintf(f, "%s\n", _PATH_UTMP);
7001 exit(0);
7002#endif
7003 for (u = utmplist; *u; u++) {
7004 if ((a = fopen(*u, "r")) != NULL || errno == EACCES) {
7005 fprintf(f, "%s\n", *u);
7006 exit(0);
7007 }
7008 }
7009 exit(0);
7010}
7011_ACEOF
7012if ac_fn_cxx_try_run "$LINENO"; then :
7013 pt_cv_path_utmp=`cat conftestval`
7014else
7015 pt_cv_path_utmp= 6963 pt_cv_path_utmp=$file
6964 break
6965 fi
6966 done
7016fi 6967fi
7017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7018 conftest.$ac_objext conftest.beam conftest.$ac_ext
7019fi
7020
7021fi 6968fi
7022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_utmp" >&5 6969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_utmp" >&5
7023$as_echo "$pt_cv_path_utmp" >&6; } 6970$as_echo "$pt_cv_path_utmp" >&6; }
7024if test x$pt_cv_path_utmp != x; then 6971if test x$pt_cv_path_utmp != x; then
7025 6972
7026cat >>confdefs.h <<_ACEOF 6973cat >>confdefs.h <<_ACEOF
7027#define UTMP_FILE "$pt_cv_path_utmp" 6974#define PT_UTMP_FILE "$pt_cv_path_utmp"
7028_ACEOF 6975_ACEOF
7029 6976
6977elif test "$cross_compiling" = yes; then
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_UTMP_FILE in config.h manually" >&5
6979$as_echo "$as_me: WARNING: Define PT_UTMP_FILE in config.h manually" >&2;}
7030fi 6980fi
7031 6981
7032 6982
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where wtmp is located" >&5 6983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback location of wtmp" >&5
7034$as_echo_n "checking where wtmp is located... " >&6; } 6984$as_echo_n "checking for a fallback location of wtmp... " >&6; }
7035if test "${pt_cv_path_wtmp+set}" = set; then : 6985if test "${pt_cv_path_wtmp+set}" = set; then :
7036 $as_echo_n "(cached) " >&6 6986 $as_echo_n "(cached) " >&6
7037else 6987else
6988
7038 if test "$cross_compiling" = yes; then : 6989if test "$cross_compiling" != yes; then
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define WTMP_FILE in config.h manually" >&5
7040$as_echo "$as_me: WARNING: Define WTMP_FILE in config.h manually" >&2;}
7041else
7042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043/* end confdefs.h. */
7044#include <stdio.h>
7045#include <stdlib.h>
7046#include <sys/types.h>
7047#ifdef HAVE_UTMP_H
7048#include <utmp.h>
7049#endif
7050#include <errno.h>
7051main()
7052{
7053 char **w, *wtmplist[] = {
7054 "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; 6990 for file in "/var/log/wtmp" "/var/adm/wtmp" "/etc/wtmp" "/usr/etc/wtmp" "/usr/adm/wtmp"; do
7055 FILE *a, *f=fopen("conftestval", "w"); 6991 if test -f "$file"; then
7056 if (!f) exit(1);
7057#ifdef WTMP_FILE
7058 fprintf(f, "%s\n", WTMP_FILE);
7059 exit(0);
7060#endif
7061#ifdef _PATH_WTMP
7062 fprintf(f, "%s\n", _PATH_WTMP);
7063 exit(0);
7064#endif
7065 for (w = wtmplist; *w; w++) {
7066 if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
7067 fprintf(f, "%s\n", *w);
7068 exit(0);
7069 }
7070 }
7071 exit(0);
7072}
7073_ACEOF
7074if ac_fn_cxx_try_run "$LINENO"; then :
7075 pt_cv_path_wtmp=`cat conftestval`
7076else
7077 pt_cv_path_wtmp= 6992 pt_cv_path_wtmp=$file
6993 break
6994 fi
6995 done
7078fi 6996fi
7079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7080 conftest.$ac_objext conftest.beam conftest.$ac_ext
7081fi
7082
7083fi 6997fi
7084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_wtmp" >&5 6998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_wtmp" >&5
7085$as_echo "$pt_cv_path_wtmp" >&6; } 6999$as_echo "$pt_cv_path_wtmp" >&6; }
7086if test x$pt_cv_path_wtmp != x; then 7000if test x$pt_cv_path_wtmp != x; then
7087 7001
7088cat >>confdefs.h <<_ACEOF 7002cat >>confdefs.h <<_ACEOF
7089#define WTMP_FILE "$pt_cv_path_wtmp" 7003#define PT_WTMP_FILE "$pt_cv_path_wtmp"
7090_ACEOF 7004_ACEOF
7091 7005
7006elif test "$cross_compiling" = yes; then
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_WTMP_FILE in config.h manually" >&5
7008$as_echo "$as_me: WARNING: Define PT_WTMP_FILE in config.h manually" >&2;}
7092fi 7009fi
7093 7010
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where wtmpx is located" >&5 7011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback location of wtmpx" >&5
7095$as_echo_n "checking where wtmpx is located... " >&6; } 7012$as_echo_n "checking for a fallback location of wtmpx... " >&6; }
7096if test "${pt_cv_path_wtmpx+set}" = set; then : 7013if test "${pt_cv_path_wtmpx+set}" = set; then :
7097 $as_echo_n "(cached) " >&6 7014 $as_echo_n "(cached) " >&6
7098else 7015else
7016
7099 if test "$cross_compiling" = yes; then : 7017if test "$cross_compiling" != yes; then
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define WTMPX_FILE in config.h manually" >&5
7101$as_echo "$as_me: WARNING: Define WTMPX_FILE in config.h manually" >&2;}
7102else
7103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7104/* end confdefs.h. */
7105#include <stdio.h>
7106#include <stdlib.h>
7107#ifdef HAVE_UTMPX_H
7108#include <utmpx.h>
7109#endif
7110#include <errno.h>
7111main()
7112{
7113 char **w, *wtmplist[] = {
7114 "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; 7018 for file in "/var/log/wtmpx" "/var/adm/wtmpx"; do
7115 FILE *a, *f=fopen("conftestval", "w"); 7019 if test -f "$file"; then
7116 if (!f) exit(1);
7117#ifdef WTMPX_FILE
7118 fprintf(f, "%s\n", WTMPX_FILE);
7119 exit(0);
7120#endif
7121#ifdef _PATH_WTMPX
7122 fprintf(f, "%s\n", _PATH_WTMPX);
7123 exit(0);
7124#endif
7125 for (w = wtmplist; *w; w++) {
7126 if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
7127 fprintf(f, "%s\n", *w);
7128 exit(0);
7129 }
7130 }
7131 exit(0);
7132}
7133_ACEOF
7134if ac_fn_cxx_try_run "$LINENO"; then :
7135 pt_cv_path_wtmpx=`cat conftestval`
7136else
7137 pt_cv_path_wtmpx= 7020 pt_cv_path_wtmpx=$file
7021 break
7022 fi
7023 done
7138fi 7024fi
7139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7140 conftest.$ac_objext conftest.beam conftest.$ac_ext
7141fi
7142
7143fi 7025fi
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_wtmpx" >&5 7026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_wtmpx" >&5
7145$as_echo "$pt_cv_path_wtmpx" >&6; } 7027$as_echo "$pt_cv_path_wtmpx" >&6; }
7146if test x$pt_cv_path_wtmpx != x; then 7028if test x$pt_cv_path_wtmpx != x; then
7147 7029
7148cat >>confdefs.h <<_ACEOF 7030cat >>confdefs.h <<_ACEOF
7149#define WTMPX_FILE "$pt_cv_path_wtmpx" 7031#define PT_WTMPX_FILE "$pt_cv_path_wtmpx"
7150_ACEOF 7032_ACEOF
7151 7033
7034elif test "$cross_compiling" = yes; then
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_WTMPX_FILE in config.h manually" >&5
7036$as_echo "$as_me: WARNING: Define PT_WTMPX_FILE in config.h manually" >&2;}
7152fi 7037fi
7153 7038
7154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where lastlog is located" >&5 7039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback location of lastlog" >&5
7155$as_echo_n "checking where lastlog is located... " >&6; } 7040$as_echo_n "checking for a fallback location of lastlog... " >&6; }
7156if test "${pt_cv_path_lastlog+set}" = set; then : 7041if test "${pt_cv_path_lastlog+set}" = set; then :
7157 $as_echo_n "(cached) " >&6 7042 $as_echo_n "(cached) " >&6
7158else 7043else
7044
7159 if test "$cross_compiling" = yes; then : 7045if test "$cross_compiling" != yes; then
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define LASTLOG_FILE in config.h manually" >&5 7046 for file in "/var/log/lastlog"; do
7161$as_echo "$as_me: WARNING: Define LASTLOG_FILE in config.h manually" >&2;} 7047 if test -f "$file"; then
7162else
7163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7164/* end confdefs.h. */
7165#include <stdio.h>
7166#include <stdlib.h>
7167#include <sys/types.h>
7168#ifdef HAVE_UTMPX_H
7169#include <utmpx.h>
7170#elif defined(HAVE_UTMP_H)
7171#include <utmp.h>
7172#endif
7173#ifdef HAVE_LASTLOG_H
7174#include <lastlog.h>
7175#endif
7176#include <errno.h>
7177main()
7178{
7179 char **w, *lastloglist[] = { "/var/log/lastlog", NULL };
7180 FILE *a, *f=fopen("conftestval", "w");
7181 if (!f) exit(1);
7182#ifdef LASTLOG_FILE
7183 fprintf(f, "%s\n", LASTLOG_FILE);
7184 exit(0);
7185#endif
7186#ifdef _PATH_LASTLOG
7187 fprintf(f, "%s\n", _PATH_LASTLOG);
7188 exit(0);
7189#endif
7190 for (w = lastloglist; *w; w++) {
7191 if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
7192 fprintf(f, "%s\n", *w);
7193 exit(0);
7194 }
7195 }
7196 exit(0);
7197}
7198_ACEOF
7199if ac_fn_cxx_try_run "$LINENO"; then :
7200 pt_cv_path_lastlog=`cat conftestval`
7201else
7202 pt_cv_path_lastlog= 7048 pt_cv_path_lastlog=$file
7049 break
7050 fi
7051 done
7203fi 7052fi
7204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7205 conftest.$ac_objext conftest.beam conftest.$ac_ext
7206fi
7207
7208fi 7053fi
7209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_lastlog" >&5 7054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_lastlog" >&5
7210$as_echo "$pt_cv_path_lastlog" >&6; } 7055$as_echo "$pt_cv_path_lastlog" >&6; }
7211if test x$pt_cv_path_lastlog != x; then 7056if test x$pt_cv_path_lastlog != x; then
7212 7057
7213cat >>confdefs.h <<_ACEOF 7058cat >>confdefs.h <<_ACEOF
7214#define LASTLOG_FILE "$pt_cv_path_lastlog" 7059#define PT_LASTLOG_FILE "$pt_cv_path_lastlog"
7215_ACEOF 7060_ACEOF
7216 7061
7062elif test "$cross_compiling" = yes; then
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_LASTLOG_FILE in config.h manually" >&5
7064$as_echo "$as_me: WARNING: Define PT_LASTLOG_FILE in config.h manually" >&2;}
7217fi 7065fi
7218 7066
7219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where lastlogx is located" >&5 7067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback location of lastlogx" >&5
7220$as_echo_n "checking where lastlogx is located... " >&6; } 7068$as_echo_n "checking for a fallback location of lastlogx... " >&6; }
7221if test "${pt_cv_path_lastlogx+set}" = set; then : 7069if test "${pt_cv_path_lastlogx+set}" = set; then :
7222 $as_echo_n "(cached) " >&6 7070 $as_echo_n "(cached) " >&6
7223else 7071else
7072
7224 if test "$cross_compiling" = yes; then : 7073if test "$cross_compiling" != yes; then
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define LASTLOGX_FILE in config.h manually" >&5 7074 for file in "/var/log/lastlogx" "/var/adm/lastlogx"; do
7226$as_echo "$as_me: WARNING: Define LASTLOGX_FILE in config.h manually" >&2;} 7075 if test -f "$file"; then
7227else
7228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7229/* end confdefs.h. */
7230#include <stdio.h>
7231#include <stdlib.h>
7232#ifdef HAVE_UTMPX_H
7233#include <utmpx.h>
7234#endif
7235#include <errno.h>
7236main()
7237{
7238 char **w, *wtmplist[] = { "/var/log/lastlogx", "/var/adm/lastlogx", NULL };
7239 FILE *a, *f=fopen("conftestval", "w");
7240 if (!f) exit(1);
7241#ifdef LASTLOGX_FILE
7242 fprintf(f, "%s\n", LASTLOGX_FILE);
7243 exit(0);
7244#endif
7245#ifdef _PATH_LASTLOGX
7246 fprintf(f, "%s\n", _PATH_LASTLOGX);
7247 exit(0);
7248#endif
7249 for (w = wtmplist; *w; w++) {
7250 if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
7251 fprintf(f, "%s\n", *w);
7252 exit(0);
7253 }
7254 }
7255 exit(0);
7256}
7257_ACEOF
7258if ac_fn_cxx_try_run "$LINENO"; then :
7259 pt_cv_path_lastlogx=`cat conftestval`
7260else
7261 pt_cv_path_lastlogx= 7076 pt_cv_path_lastlogx=$file
7077 break
7078 fi
7079 done
7262fi 7080fi
7263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7264 conftest.$ac_objext conftest.beam conftest.$ac_ext
7265fi
7266
7267fi 7081fi
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_lastlogx" >&5 7082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_lastlogx" >&5
7269$as_echo "$pt_cv_path_lastlogx" >&6; } 7083$as_echo "$pt_cv_path_lastlogx" >&6; }
7270if test x$pt_cv_path_lastlogx != x; then 7084if test x$pt_cv_path_lastlogx != x; then
7271 7085
7272cat >>confdefs.h <<_ACEOF 7086cat >>confdefs.h <<_ACEOF
7273#define LASTLOGX_FILE "$pt_cv_path_lastlogx" 7087#define PT_LASTLOGX_FILE "$pt_cv_path_lastlogx"
7274_ACEOF 7088_ACEOF
7275 7089
7090elif test "$cross_compiling" = yes; then
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_LASTLOGX_FILE in config.h manually" >&5
7092$as_echo "$as_me: WARNING: Define PT_LASTLOGX_FILE in config.h manually" >&2;}
7276fi 7093fi
7277 7094
7278 7095
7279 7096
7280 7097
7287$as_echo_n "checking for working Xlocale... " >&6; } 7104$as_echo_n "checking for working Xlocale... " >&6; }
7288if test "${rxvt_cv_func_xlocale+set}" = set; then : 7105if test "${rxvt_cv_func_xlocale+set}" = set; then :
7289 $as_echo_n "(cached) " >&6 7106 $as_echo_n "(cached) " >&6
7290else 7107else
7291 if test "$cross_compiling" = yes; then : 7108 if test "$cross_compiling" = yes; then :
7292 : 7109 :
7293else 7110else
7294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7295/* end confdefs.h. */ 7112/* end confdefs.h. */
7113
7296#include <X11/Xlib.h> 7114 #include <X11/Xlib.h>
7297 #include <stdlib.h> 7115 #include <stdlib.h>
7298 main() { 7116 int main() {
7299 char *p; 7117 char *p;
7300 if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) 7118 if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
7301 exit (XSupportsLocale() ? 0 : 1); 7119 exit (XSupportsLocale() ? 0 : 1);
7302 else 7120 else
7303 exit (1);} 7121 exit (1);
7122 }
7123
7304_ACEOF 7124_ACEOF
7305if ac_fn_cxx_try_run "$LINENO"; then : 7125if ac_fn_cxx_try_run "$LINENO"; then :
7306 rxvt_cv_func_xlocale=yes 7126 rxvt_cv_func_xlocale=yes
7307else 7127else
7308 rxvt_cv_func_xlocale=no 7128 rxvt_cv_func_xlocale=no
7309fi 7129fi
7310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 7130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7311 conftest.$ac_objext conftest.beam conftest.$ac_ext 7131 conftest.$ac_objext conftest.beam conftest.$ac_ext
7561 7381
7562fi 7382fi
7563done 7383done
7564 7384
7565 7385
7566have_clone=no
7567
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
7569$as_echo_n "checking for /dev/ptc... " >&6; }
7570if test -e /dev/ptc; then
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7572$as_echo "yes" >&6; }
7573
7574$as_echo "#define CLONE_DEVICE \"/dev/ptc\"" >>confdefs.h
7575
7576 have_clone=yes
7577else
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
7580fi
7581
7582case $host in
7583 *-*-cygwin*)
7584 have_clone=yes
7585
7586$as_echo "#define CLONE_DEVICE \"/dev/ptmx\"" >>confdefs.h
7587
7588 ;;
7589 *)
7590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
7591$as_echo_n "checking for /dev/ptmx... " >&6; }
7592 if test -e /dev/ptmx; then
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7594$as_echo "yes" >&6; }
7595
7596$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
7597
7598
7599$as_echo "#define CLONE_DEVICE \"/dev/ptmx\"" >>confdefs.h
7600
7601 have_clone=yes
7602 else
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7604$as_echo "no" >&6; }
7605 fi
7606 ;;
7607esac
7608
7609if test x$ac_cv_func_getpt = xyes -o x$ac_cv_func_posix_openpt = xyes -o x$have_clone = xyes; then
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIX98 ptys" >&5 7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIX98 ptys" >&5
7611$as_echo_n "checking for UNIX98 ptys... " >&6; } 7387$as_echo_n "checking for UNIX98 ptys... " >&6; }
7612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7613/* end confdefs.h. */ 7389/* end confdefs.h. */
7614#include <stdlib.h> 7390#include <stdlib.h>
7615int 7391int
7616main () 7392main ()
7617{ 7393{
7623if ac_fn_cxx_try_link "$LINENO"; then : 7399if ac_fn_cxx_try_link "$LINENO"; then :
7624 unix98_pty=yes 7400 unix98_pty=yes
7625 7401
7626$as_echo "#define UNIX98_PTY 1" >>confdefs.h 7402$as_echo "#define UNIX98_PTY 1" >>confdefs.h
7627 7403
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7629$as_echo "yes" >&6; } 7405$as_echo "yes" >&6; }
7630else 7406else
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7632$as_echo "no" >&6; } 7408$as_echo "no" >&6; }
7633fi 7409fi
7634rm -f core conftest.err conftest.$ac_objext \ 7410rm -f core conftest.err conftest.$ac_objext \
7635 conftest$ac_exeext conftest.$ac_ext 7411 conftest$ac_exeext conftest.$ac_ext
7636fi
7637 7412
7638if test -z "$unix98_pty"; then 7413if test -z "$unix98_pty"; then
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5 7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
7640$as_echo_n "checking for library containing openpty... " >&6; } 7415$as_echo_n "checking for library containing openpty... " >&6; }
7641if test "${ac_cv_search_openpty+set}" = set; then : 7416if test "${ac_cv_search_openpty+set}" = set; then :
7712#include <sys/types.h> 7487#include <sys/types.h>
7713#include <sys/stat.h> 7488#include <sys/stat.h>
7714#include <unistd.h> 7489#include <unistd.h>
7715#include <grp.h> 7490#include <grp.h>
7716 7491
7717main() 7492int main()
7718{ 7493{
7719 struct stat st; 7494 struct stat st;
7720 struct group *gr; 7495 struct group *gr;
7721 char *tty; 7496 char *tty;
7722 gr = getgrnam("tty"); 7497 gr = getgrnam("tty");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines