… | |
… | |
1863 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1863 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1864 | as_fn_set_status $ac_retval |
1864 | as_fn_set_status $ac_retval |
1865 | |
1865 | |
1866 | } # ac_fn_cxx_try_link |
1866 | } # ac_fn_cxx_try_link |
1867 | |
1867 | |
1868 | # ac_fn_cxx_check_func LINENO FUNC VAR |
|
|
1869 | # ------------------------------------ |
|
|
1870 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
|
|
1871 | ac_fn_cxx_check_func () |
|
|
1872 | { |
|
|
1873 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
|
|
1874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
|
|
1875 | $as_echo_n "checking for $2... " >&6; } |
|
|
1876 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
|
|
1877 | $as_echo_n "(cached) " >&6 |
|
|
1878 | else |
|
|
1879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
1880 | /* end confdefs.h. */ |
|
|
1881 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
|
|
1882 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
|
|
1883 | #define $2 innocuous_$2 |
|
|
1884 | |
|
|
1885 | /* System header to define __stub macros and hopefully few prototypes, |
|
|
1886 | which can conflict with char $2 (); below. |
|
|
1887 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|
|
1888 | <limits.h> exists even on freestanding compilers. */ |
|
|
1889 | |
|
|
1890 | #ifdef __STDC__ |
|
|
1891 | # include <limits.h> |
|
|
1892 | #else |
|
|
1893 | # include <assert.h> |
|
|
1894 | #endif |
|
|
1895 | |
|
|
1896 | #undef $2 |
|
|
1897 | |
|
|
1898 | /* Override any GCC internal prototype to avoid an error. |
|
|
1899 | Use char because int might match the return type of a GCC |
|
|
1900 | builtin and then its argument prototype would still apply. */ |
|
|
1901 | #ifdef __cplusplus |
|
|
1902 | extern "C" |
|
|
1903 | #endif |
|
|
1904 | char $2 (); |
|
|
1905 | /* The GNU C library defines this for functions which it implements |
|
|
1906 | to always fail with ENOSYS. Some functions are actually named |
|
|
1907 | something starting with __ and the normal name is an alias. */ |
|
|
1908 | #if defined __stub_$2 || defined __stub___$2 |
|
|
1909 | choke me |
|
|
1910 | #endif |
|
|
1911 | |
|
|
1912 | int |
|
|
1913 | main () |
|
|
1914 | { |
|
|
1915 | return $2 (); |
|
|
1916 | ; |
|
|
1917 | return 0; |
|
|
1918 | } |
|
|
1919 | _ACEOF |
|
|
1920 | if ac_fn_cxx_try_link "$LINENO"; then : |
|
|
1921 | eval "$3=yes" |
|
|
1922 | else |
|
|
1923 | eval "$3=no" |
|
|
1924 | fi |
|
|
1925 | rm -f core conftest.err conftest.$ac_objext \ |
|
|
1926 | conftest$ac_exeext conftest.$ac_ext |
|
|
1927 | fi |
|
|
1928 | eval ac_res=\$$3 |
|
|
1929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
|
|
1930 | $as_echo "$ac_res" >&6; } |
|
|
1931 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
|
|
1932 | |
|
|
1933 | } # ac_fn_cxx_check_func |
|
|
1934 | |
|
|
1935 | # ac_fn_cxx_try_cpp LINENO |
1868 | # ac_fn_cxx_try_cpp LINENO |
1936 | # ------------------------ |
1869 | # ------------------------ |
1937 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
1870 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
1938 | ac_fn_cxx_try_cpp () |
1871 | ac_fn_cxx_try_cpp () |
1939 | { |
1872 | { |
… | |
… | |
2053 | $as_echo "$ac_res" >&6; } |
1986 | $as_echo "$ac_res" >&6; } |
2054 | fi |
1987 | fi |
2055 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
1988 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
2056 | |
1989 | |
2057 | } # ac_fn_cxx_check_header_mongrel |
1990 | } # ac_fn_cxx_check_header_mongrel |
|
|
1991 | |
|
|
1992 | # ac_fn_cxx_check_func LINENO FUNC VAR |
|
|
1993 | # ------------------------------------ |
|
|
1994 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
|
|
1995 | ac_fn_cxx_check_func () |
|
|
1996 | { |
|
|
1997 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
|
|
1998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
|
|
1999 | $as_echo_n "checking for $2... " >&6; } |
|
|
2000 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
|
|
2001 | $as_echo_n "(cached) " >&6 |
|
|
2002 | else |
|
|
2003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
2004 | /* end confdefs.h. */ |
|
|
2005 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
|
|
2006 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
|
|
2007 | #define $2 innocuous_$2 |
|
|
2008 | |
|
|
2009 | /* System header to define __stub macros and hopefully few prototypes, |
|
|
2010 | which can conflict with char $2 (); below. |
|
|
2011 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|
|
2012 | <limits.h> exists even on freestanding compilers. */ |
|
|
2013 | |
|
|
2014 | #ifdef __STDC__ |
|
|
2015 | # include <limits.h> |
|
|
2016 | #else |
|
|
2017 | # include <assert.h> |
|
|
2018 | #endif |
|
|
2019 | |
|
|
2020 | #undef $2 |
|
|
2021 | |
|
|
2022 | /* Override any GCC internal prototype to avoid an error. |
|
|
2023 | Use char because int might match the return type of a GCC |
|
|
2024 | builtin and then its argument prototype would still apply. */ |
|
|
2025 | #ifdef __cplusplus |
|
|
2026 | extern "C" |
|
|
2027 | #endif |
|
|
2028 | char $2 (); |
|
|
2029 | /* The GNU C library defines this for functions which it implements |
|
|
2030 | to always fail with ENOSYS. Some functions are actually named |
|
|
2031 | something starting with __ and the normal name is an alias. */ |
|
|
2032 | #if defined __stub_$2 || defined __stub___$2 |
|
|
2033 | choke me |
|
|
2034 | #endif |
|
|
2035 | |
|
|
2036 | int |
|
|
2037 | main () |
|
|
2038 | { |
|
|
2039 | return $2 (); |
|
|
2040 | ; |
|
|
2041 | return 0; |
|
|
2042 | } |
|
|
2043 | _ACEOF |
|
|
2044 | if ac_fn_cxx_try_link "$LINENO"; then : |
|
|
2045 | eval "$3=yes" |
|
|
2046 | else |
|
|
2047 | eval "$3=no" |
|
|
2048 | fi |
|
|
2049 | rm -f core conftest.err conftest.$ac_objext \ |
|
|
2050 | conftest$ac_exeext conftest.$ac_ext |
|
|
2051 | fi |
|
|
2052 | eval ac_res=\$$3 |
|
|
2053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
|
|
2054 | $as_echo "$ac_res" >&6; } |
|
|
2055 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
|
|
2056 | |
|
|
2057 | } # ac_fn_cxx_check_func |
2058 | |
2058 | |
2059 | # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES |
2059 | # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES |
2060 | # --------------------------------------------- |
2060 | # --------------------------------------------- |
2061 | # Tests whether TYPE exists after having included INCLUDES, setting cache |
2061 | # Tests whether TYPE exists after having included INCLUDES, setting cache |
2062 | # variable VAR accordingly. |
2062 | # variable VAR accordingly. |
… | |
… | |
4478 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h |
4478 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h |
4479 | |
4479 | |
4480 | ;; |
4480 | ;; |
4481 | esac |
4481 | esac |
4482 | |
4482 | |
4483 | ac_fn_cxx_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" |
|
|
4484 | if test "x$ac_cv_func_setlocale" = x""yes; then : |
|
|
4485 | |
|
|
4486 | else |
|
|
4487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setlocale in -lxpg4" >&5 |
4483 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setlocale" >&5 |
4488 | $as_echo_n "checking for setlocale in -lxpg4... " >&6; } |
4484 | $as_echo_n "checking for library containing setlocale... " >&6; } |
4489 | if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then : |
4485 | if test "${ac_cv_search_setlocale+set}" = set; then : |
4490 | $as_echo_n "(cached) " >&6 |
4486 | $as_echo_n "(cached) " >&6 |
4491 | else |
4487 | else |
4492 | ac_check_lib_save_LIBS=$LIBS |
4488 | ac_func_search_save_LIBS=$LIBS |
4493 | LIBS="-lxpg4 $LIBS" |
|
|
4494 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4495 | /* end confdefs.h. */ |
4490 | /* end confdefs.h. */ |
4496 | |
4491 | |
4497 | /* Override any GCC internal prototype to avoid an error. |
4492 | /* Override any GCC internal prototype to avoid an error. |
4498 | Use char because int might match the return type of a GCC |
4493 | Use char because int might match the return type of a GCC |
… | |
… | |
4507 | return setlocale (); |
4502 | return setlocale (); |
4508 | ; |
4503 | ; |
4509 | return 0; |
4504 | return 0; |
4510 | } |
4505 | } |
4511 | _ACEOF |
4506 | _ACEOF |
|
|
4507 | for ac_lib in '' xpg4; do |
|
|
4508 | if test -z "$ac_lib"; then |
|
|
4509 | ac_res="none required" |
|
|
4510 | else |
|
|
4511 | ac_res=-l$ac_lib |
|
|
4512 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
|
|
4513 | fi |
4512 | if ac_fn_cxx_try_link "$LINENO"; then : |
4514 | if ac_fn_cxx_try_link "$LINENO"; then : |
4513 | ac_cv_lib_xpg4_setlocale=yes |
4515 | ac_cv_search_setlocale=$ac_res |
4514 | else |
|
|
4515 | ac_cv_lib_xpg4_setlocale=no |
|
|
4516 | fi |
4516 | fi |
4517 | rm -f core conftest.err conftest.$ac_objext \ |
4517 | rm -f core conftest.err conftest.$ac_objext \ |
4518 | conftest$ac_exeext conftest.$ac_ext |
4518 | conftest$ac_exeext |
4519 | LIBS=$ac_check_lib_save_LIBS |
4519 | if test "${ac_cv_search_setlocale+set}" = set; then : |
|
|
4520 | break |
4520 | fi |
4521 | fi |
|
|
4522 | done |
|
|
4523 | if test "${ac_cv_search_setlocale+set}" = set; then : |
|
|
4524 | |
|
|
4525 | else |
|
|
4526 | ac_cv_search_setlocale=no |
|
|
4527 | fi |
|
|
4528 | rm conftest.$ac_ext |
|
|
4529 | LIBS=$ac_func_search_save_LIBS |
|
|
4530 | fi |
4521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4_setlocale" >&5 |
4531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setlocale" >&5 |
4522 | $as_echo "$ac_cv_lib_xpg4_setlocale" >&6; } |
4532 | $as_echo "$ac_cv_search_setlocale" >&6; } |
4523 | if test "x$ac_cv_lib_xpg4_setlocale" = x""yes; then : |
4533 | ac_res=$ac_cv_search_setlocale |
4524 | LIBS="$LIBS -lxpg4" |
4534 | if test "$ac_res" != no; then : |
4525 | fi |
4535 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
4526 | |
4536 | |
4527 | fi |
4537 | fi |
4528 | |
4538 | |
4529 | |
4539 | |
4530 | ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" |
|
|
4531 | if test "x$ac_cv_func_gethostbyname" = x""yes; then : |
|
|
4532 | |
|
|
4533 | else |
|
|
4534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 |
4540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
4535 | $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } |
4541 | $as_echo_n "checking for library containing gethostbyname... " >&6; } |
4536 | if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : |
4542 | if test "${ac_cv_search_gethostbyname+set}" = set; then : |
4537 | $as_echo_n "(cached) " >&6 |
4543 | $as_echo_n "(cached) " >&6 |
4538 | else |
4544 | else |
4539 | ac_check_lib_save_LIBS=$LIBS |
4545 | ac_func_search_save_LIBS=$LIBS |
4540 | LIBS="-lnsl $LIBS" |
|
|
4541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4542 | /* end confdefs.h. */ |
4547 | /* end confdefs.h. */ |
4543 | |
4548 | |
4544 | /* Override any GCC internal prototype to avoid an error. |
4549 | /* Override any GCC internal prototype to avoid an error. |
4545 | Use char because int might match the return type of a GCC |
4550 | Use char because int might match the return type of a GCC |
… | |
… | |
4554 | return gethostbyname (); |
4559 | return gethostbyname (); |
4555 | ; |
4560 | ; |
4556 | return 0; |
4561 | return 0; |
4557 | } |
4562 | } |
4558 | _ACEOF |
4563 | _ACEOF |
|
|
4564 | for ac_lib in '' nsl; do |
|
|
4565 | if test -z "$ac_lib"; then |
|
|
4566 | ac_res="none required" |
|
|
4567 | else |
|
|
4568 | ac_res=-l$ac_lib |
|
|
4569 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
|
|
4570 | fi |
4559 | if ac_fn_cxx_try_link "$LINENO"; then : |
4571 | if ac_fn_cxx_try_link "$LINENO"; then : |
4560 | ac_cv_lib_nsl_gethostbyname=yes |
4572 | ac_cv_search_gethostbyname=$ac_res |
4561 | else |
|
|
4562 | ac_cv_lib_nsl_gethostbyname=no |
|
|
4563 | fi |
4573 | fi |
4564 | rm -f core conftest.err conftest.$ac_objext \ |
4574 | rm -f core conftest.err conftest.$ac_objext \ |
4565 | conftest$ac_exeext conftest.$ac_ext |
4575 | conftest$ac_exeext |
4566 | LIBS=$ac_check_lib_save_LIBS |
4576 | if test "${ac_cv_search_gethostbyname+set}" = set; then : |
|
|
4577 | break |
4567 | fi |
4578 | fi |
|
|
4579 | done |
|
|
4580 | if test "${ac_cv_search_gethostbyname+set}" = set; then : |
|
|
4581 | |
|
|
4582 | else |
|
|
4583 | ac_cv_search_gethostbyname=no |
|
|
4584 | fi |
|
|
4585 | rm conftest.$ac_ext |
|
|
4586 | LIBS=$ac_func_search_save_LIBS |
|
|
4587 | fi |
4568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 |
4588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
4569 | $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } |
4589 | $as_echo "$ac_cv_search_gethostbyname" >&6; } |
4570 | if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : |
4590 | ac_res=$ac_cv_search_gethostbyname |
4571 | LIBS="$LIBS -lnsl" |
4591 | if test "$ac_res" != no; then : |
4572 | fi |
4592 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
4573 | |
4593 | |
4574 | fi |
4594 | fi |
4575 | |
4595 | |
4576 | ac_fn_cxx_check_func "$LINENO" "socket" "ac_cv_func_socket" |
|
|
4577 | if test "x$ac_cv_func_socket" = x""yes; then : |
|
|
4578 | |
|
|
4579 | else |
|
|
4580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 |
4596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 |
4581 | $as_echo_n "checking for socket in -lsocket... " >&6; } |
4597 | $as_echo_n "checking for library containing socket... " >&6; } |
4582 | if test "${ac_cv_lib_socket_socket+set}" = set; then : |
4598 | if test "${ac_cv_search_socket+set}" = set; then : |
4583 | $as_echo_n "(cached) " >&6 |
4599 | $as_echo_n "(cached) " >&6 |
4584 | else |
4600 | else |
4585 | ac_check_lib_save_LIBS=$LIBS |
4601 | ac_func_search_save_LIBS=$LIBS |
4586 | LIBS="-lsocket $LIBS" |
|
|
4587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4588 | /* end confdefs.h. */ |
4603 | /* end confdefs.h. */ |
4589 | |
4604 | |
4590 | /* Override any GCC internal prototype to avoid an error. |
4605 | /* Override any GCC internal prototype to avoid an error. |
4591 | Use char because int might match the return type of a GCC |
4606 | Use char because int might match the return type of a GCC |
… | |
… | |
4600 | return socket (); |
4615 | return socket (); |
4601 | ; |
4616 | ; |
4602 | return 0; |
4617 | return 0; |
4603 | } |
4618 | } |
4604 | _ACEOF |
4619 | _ACEOF |
|
|
4620 | for ac_lib in '' socket; do |
|
|
4621 | if test -z "$ac_lib"; then |
|
|
4622 | ac_res="none required" |
|
|
4623 | else |
|
|
4624 | ac_res=-l$ac_lib |
|
|
4625 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
|
|
4626 | fi |
4605 | if ac_fn_cxx_try_link "$LINENO"; then : |
4627 | if ac_fn_cxx_try_link "$LINENO"; then : |
4606 | ac_cv_lib_socket_socket=yes |
4628 | ac_cv_search_socket=$ac_res |
4607 | else |
|
|
4608 | ac_cv_lib_socket_socket=no |
|
|
4609 | fi |
4629 | fi |
4610 | rm -f core conftest.err conftest.$ac_objext \ |
4630 | rm -f core conftest.err conftest.$ac_objext \ |
4611 | conftest$ac_exeext conftest.$ac_ext |
4631 | conftest$ac_exeext |
4612 | LIBS=$ac_check_lib_save_LIBS |
4632 | if test "${ac_cv_search_socket+set}" = set; then : |
|
|
4633 | break |
4613 | fi |
4634 | fi |
|
|
4635 | done |
|
|
4636 | if test "${ac_cv_search_socket+set}" = set; then : |
|
|
4637 | |
|
|
4638 | else |
|
|
4639 | ac_cv_search_socket=no |
|
|
4640 | fi |
|
|
4641 | rm conftest.$ac_ext |
|
|
4642 | LIBS=$ac_func_search_save_LIBS |
|
|
4643 | fi |
4614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 |
4644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 |
4615 | $as_echo "$ac_cv_lib_socket_socket" >&6; } |
4645 | $as_echo "$ac_cv_search_socket" >&6; } |
4616 | if test "x$ac_cv_lib_socket_socket" = x""yes; then : |
4646 | ac_res=$ac_cv_search_socket |
4617 | LIBS="$LIBS -lsocket" |
4647 | if test "$ac_res" != no; then : |
4618 | fi |
4648 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
4619 | |
4649 | |
4620 | fi |
4650 | fi |
4621 | |
4651 | |
4622 | |
4652 | |
4623 | support_frills=yes |
4653 | support_frills=yes |
… | |
… | |
6907 | _ACEOF |
6937 | _ACEOF |
6908 | |
6938 | |
6909 | fi |
6939 | fi |
6910 | |
6940 | |
6911 | |
6941 | |
6912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where utmpx is located" >&5 |
|
|
6913 | $as_echo_n "checking where utmpx is located... " >&6; } |
|
|
6914 | if test "${pt_cv_path_utmpx+set}" = set; then : |
|
|
6915 | $as_echo_n "(cached) " >&6 |
|
|
6916 | else |
|
|
6917 | if test "$cross_compiling" = yes; then : |
|
|
6918 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Define UTMPX_FILE in config.h manually" >&5 |
|
|
6919 | $as_echo "$as_me: WARNING: Define UTMPX_FILE in config.h manually" >&2;} |
|
|
6920 | else |
|
|
6921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
6922 | /* end confdefs.h. */ |
|
|
6923 | #include <stdio.h> |
|
|
6924 | #include <stdlib.h> |
|
|
6925 | #include <sys/types.h> |
|
|
6926 | #include <utmpx.h> |
|
|
6927 | #include <errno.h> |
|
|
6928 | #include <sys/stat.h> |
|
|
6929 | #ifdef HAVE_STRING_H |
|
|
6930 | #include <string.h> |
|
|
6931 | #endif |
|
|
6932 | main() |
|
|
6933 | { |
|
|
6934 | char **u, *p, *utmplist[] = { |
|
|
6935 | #ifdef UTMPX_FILE |
|
|
6936 | UTMPX_FILE, |
|
|
6937 | #endif |
|
|
6938 | #ifdef _PATH_UTMPX |
|
|
6939 | _PATH_UTMPX, |
|
|
6940 | #endif |
|
|
6941 | "/var/adm/utmpx", "/etc/utmpx", NULL }; |
|
|
6942 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
6943 | struct stat statu, statux; |
|
|
6944 | if (!f) exit(1); |
|
|
6945 | for (u = utmplist; *u; u++) { |
|
|
6946 | if ((a = fopen(*u, "r")) != NULL || errno == EACCES) { |
|
|
6947 | if (stat(*u, &statux) < 0) |
|
|
6948 | continue; |
|
|
6949 | p = strdup(*u); |
|
|
6950 | p[strlen(p) - 1] = '\0'; |
|
|
6951 | if (stat(p, &statu) >= 0 |
|
|
6952 | && (statu.st_mtime - statux.st_mtime > 86400)) |
|
|
6953 | continue; |
|
|
6954 | fprintf(f, "%s\n", *u); |
|
|
6955 | exit(0); |
|
|
6956 | } |
|
|
6957 | } |
|
|
6958 | exit(0); |
|
|
6959 | } |
|
|
6960 | _ACEOF |
|
|
6961 | if ac_fn_cxx_try_run "$LINENO"; then : |
|
|
6962 | pt_cv_path_utmpx=`cat conftestval` |
|
|
6963 | else |
|
|
6964 | pt_cv_path_utmpx= |
|
|
6965 | fi |
|
|
6966 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
|
|
6967 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
|
|
6968 | fi |
|
|
6969 | |
|
|
6970 | fi |
|
|
6971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_utmpx" >&5 |
|
|
6972 | $as_echo "$pt_cv_path_utmpx" >&6; } |
|
|
6973 | if test x$pt_cv_path_utmpx != x; then |
|
|
6974 | |
|
|
6975 | cat >>confdefs.h <<_ACEOF |
|
|
6976 | #define UTMPX_FILE "$pt_cv_path_utmpx" |
|
|
6977 | _ACEOF |
|
|
6978 | |
|
|
6979 | fi |
|
|
6980 | |
|
|
6981 | |
|
|
6982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where wtmp is located" >&5 |
6942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where wtmp is located" >&5 |
6983 | $as_echo_n "checking where wtmp is located... " >&6; } |
6943 | $as_echo_n "checking where wtmp is located... " >&6; } |
6984 | if test "${pt_cv_path_wtmp+set}" = set; then : |
6944 | if test "${pt_cv_path_wtmp+set}" = set; then : |
6985 | $as_echo_n "(cached) " >&6 |
6945 | $as_echo_n "(cached) " >&6 |
6986 | else |
6946 | else |
… | |
… | |
7514 | done |
7474 | done |
7515 | |
7475 | |
7516 | |
7476 | |
7517 | have_clone=no |
7477 | have_clone=no |
7518 | |
7478 | |
7519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptym/clone" >&5 |
|
|
7520 | $as_echo_n "checking for /dev/ptym/clone... " >&6; } |
|
|
7521 | if test -e /dev/ptym/clone; then |
|
|
7522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
7523 | $as_echo "yes" >&6; } |
|
|
7524 | |
|
|
7525 | $as_echo "#define HAVE_DEV_CLONE 1" >>confdefs.h |
|
|
7526 | |
|
|
7527 | |
|
|
7528 | $as_echo "#define CLONE_DEVICE \"/dev/ptym/clone\"" >>confdefs.h |
|
|
7529 | |
|
|
7530 | have_clone=yes |
|
|
7531 | else |
|
|
7532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
|
7533 | $as_echo "no" >&6; } |
|
|
7534 | fi |
|
|
7535 | |
|
|
7536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 |
7479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 |
7537 | $as_echo_n "checking for /dev/ptc... " >&6; } |
7480 | $as_echo_n "checking for /dev/ptc... " >&6; } |
7538 | if test -e /dev/ptc; then |
7481 | if test -e /dev/ptc; then |
7539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7540 | $as_echo "yes" >&6; } |
7483 | $as_echo "yes" >&6; } |
7541 | |
|
|
7542 | $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h |
|
|
7543 | |
|
|
7544 | |
7484 | |
7545 | $as_echo "#define CLONE_DEVICE \"/dev/ptc\"" >>confdefs.h |
7485 | $as_echo "#define CLONE_DEVICE \"/dev/ptc\"" >>confdefs.h |
7546 | |
7486 | |
7547 | have_clone=yes |
7487 | have_clone=yes |
7548 | else |
7488 | else |
… | |
… | |
7605 | rm -f core conftest.err conftest.$ac_objext \ |
7545 | rm -f core conftest.err conftest.$ac_objext \ |
7606 | conftest$ac_exeext conftest.$ac_ext |
7546 | conftest$ac_exeext conftest.$ac_ext |
7607 | fi |
7547 | fi |
7608 | |
7548 | |
7609 | if test -z "$unix98_pty"; then |
7549 | if test -z "$unix98_pty"; then |
7610 | for ac_func in openpty |
|
|
7611 | do : |
|
|
7612 | ac_fn_cxx_check_func "$LINENO" "openpty" "ac_cv_func_openpty" |
|
|
7613 | if test "x$ac_cv_func_openpty" = x""yes; then : |
|
|
7614 | cat >>confdefs.h <<_ACEOF |
|
|
7615 | #define HAVE_OPENPTY 1 |
|
|
7616 | _ACEOF |
|
|
7617 | |
|
|
7618 | else |
|
|
7619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 |
7550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5 |
7620 | $as_echo_n "checking for openpty in -lutil... " >&6; } |
7551 | $as_echo_n "checking for library containing openpty... " >&6; } |
7621 | if test "${ac_cv_lib_util_openpty+set}" = set; then : |
7552 | if test "${ac_cv_search_openpty+set}" = set; then : |
7622 | $as_echo_n "(cached) " >&6 |
7553 | $as_echo_n "(cached) " >&6 |
7623 | else |
7554 | else |
7624 | ac_check_lib_save_LIBS=$LIBS |
7555 | ac_func_search_save_LIBS=$LIBS |
7625 | LIBS="-lutil $LIBS" |
|
|
7626 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7627 | /* end confdefs.h. */ |
7557 | /* end confdefs.h. */ |
7628 | |
7558 | |
7629 | /* Override any GCC internal prototype to avoid an error. |
7559 | /* Override any GCC internal prototype to avoid an error. |
7630 | Use char because int might match the return type of a GCC |
7560 | Use char because int might match the return type of a GCC |
… | |
… | |
7639 | return openpty (); |
7569 | return openpty (); |
7640 | ; |
7570 | ; |
7641 | return 0; |
7571 | return 0; |
7642 | } |
7572 | } |
7643 | _ACEOF |
7573 | _ACEOF |
|
|
7574 | for ac_lib in '' util; do |
|
|
7575 | if test -z "$ac_lib"; then |
|
|
7576 | ac_res="none required" |
|
|
7577 | else |
|
|
7578 | ac_res=-l$ac_lib |
|
|
7579 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
|
|
7580 | fi |
7644 | if ac_fn_cxx_try_link "$LINENO"; then : |
7581 | if ac_fn_cxx_try_link "$LINENO"; then : |
7645 | ac_cv_lib_util_openpty=yes |
7582 | ac_cv_search_openpty=$ac_res |
7646 | else |
|
|
7647 | ac_cv_lib_util_openpty=no |
|
|
7648 | fi |
7583 | fi |
7649 | rm -f core conftest.err conftest.$ac_objext \ |
7584 | rm -f core conftest.err conftest.$ac_objext \ |
7650 | conftest$ac_exeext conftest.$ac_ext |
7585 | conftest$ac_exeext |
7651 | LIBS=$ac_check_lib_save_LIBS |
7586 | if test "${ac_cv_search_openpty+set}" = set; then : |
7652 | fi |
7587 | break |
7653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 |
|
|
7654 | $as_echo "$ac_cv_lib_util_openpty" >&6; } |
|
|
7655 | if test "x$ac_cv_lib_util_openpty" = x""yes; then : |
|
|
7656 | $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h |
|
|
7657 | LIBS="$LIBS -lutil" |
|
|
7658 | fi |
|
|
7659 | |
|
|
7660 | fi |
7588 | fi |
7661 | done |
7589 | done |
|
|
7590 | if test "${ac_cv_search_openpty+set}" = set; then : |
|
|
7591 | |
|
|
7592 | else |
|
|
7593 | ac_cv_search_openpty=no |
|
|
7594 | fi |
|
|
7595 | rm conftest.$ac_ext |
|
|
7596 | LIBS=$ac_func_search_save_LIBS |
|
|
7597 | fi |
|
|
7598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5 |
|
|
7599 | $as_echo "$ac_cv_search_openpty" >&6; } |
|
|
7600 | ac_res=$ac_cv_search_openpty |
|
|
7601 | if test "$ac_res" != no; then : |
|
|
7602 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
|
|
7603 | |
|
|
7604 | $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h |
|
|
7605 | |
|
|
7606 | fi |
7662 | |
7607 | |
7663 | fi |
7608 | fi |
7664 | |
7609 | |
7665 | |
7610 | |
7666 | |
7611 | |