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

Comparing rxvt-unicode/configure (file contents):
Revision 1.132 by sf-exg, Sat Apr 3 23:12:54 2010 UTC vs.
Revision 1.133 by sf-exg, Wed Jul 21 09:06:20 2010 UTC

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
1871ac_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; }
1876if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1877 $as_echo_n "(cached) " >&6
1878else
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
1902extern "C"
1903#endif
1904char $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
1909choke me
1910#endif
1911
1912int
1913main ()
1914{
1915return $2 ();
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_cxx_try_link "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext \
1926 conftest$ac_exeext conftest.$ac_ext
1927fi
1928eval 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.
1938ac_fn_cxx_try_cpp () 1871ac_fn_cxx_try_cpp ()
1939{ 1872{
2053$as_echo "$ac_res" >&6; } 1986$as_echo "$ac_res" >&6; }
2054fi 1987fi
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
1995ac_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; }
2000if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2001 $as_echo_n "(cached) " >&6
2002else
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
2026extern "C"
2027#endif
2028char $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
2033choke me
2034#endif
2035
2036int
2037main ()
2038{
2039return $2 ();
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_cxx_try_link "$LINENO"; then :
2045 eval "$3=yes"
2046else
2047 eval "$3=no"
2048fi
2049rm -f core conftest.err conftest.$ac_objext \
2050 conftest$ac_exeext conftest.$ac_ext
2051fi
2052eval 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 ;;
4481esac 4481esac
4482 4482
4483ac_fn_cxx_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
4484if test "x$ac_cv_func_setlocale" = x""yes; then :
4485
4486else
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; }
4489if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then : 4485if test "${ac_cv_search_setlocale+set}" = set; then :
4490 $as_echo_n "(cached) " >&6 4486 $as_echo_n "(cached) " >&6
4491else 4487else
4492 ac_check_lib_save_LIBS=$LIBS 4488 ac_func_search_save_LIBS=$LIBS
4493LIBS="-lxpg4 $LIBS"
4494cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4489cat 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
4507return setlocale (); 4502return setlocale ();
4508 ; 4503 ;
4509 return 0; 4504 return 0;
4510} 4505}
4511_ACEOF 4506_ACEOF
4507for 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
4512if 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
4514else
4515 ac_cv_lib_xpg4_setlocale=no
4516fi 4516fi
4517rm -f core conftest.err conftest.$ac_objext \ 4517rm -f core conftest.err conftest.$ac_objext \
4518 conftest$ac_exeext conftest.$ac_ext 4518 conftest$ac_exeext
4519LIBS=$ac_check_lib_save_LIBS 4519 if test "${ac_cv_search_setlocale+set}" = set; then :
4520 break
4520fi 4521fi
4522done
4523if test "${ac_cv_search_setlocale+set}" = set; then :
4524
4525else
4526 ac_cv_search_setlocale=no
4527fi
4528rm conftest.$ac_ext
4529LIBS=$ac_func_search_save_LIBS
4530fi
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; }
4523if test "x$ac_cv_lib_xpg4_setlocale" = x""yes; then : 4533ac_res=$ac_cv_search_setlocale
4524 LIBS="$LIBS -lxpg4" 4534if test "$ac_res" != no; then :
4525fi 4535 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4526 4536
4527fi 4537fi
4528 4538
4529 4539
4530ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
4531if test "x$ac_cv_func_gethostbyname" = x""yes; then :
4532
4533else
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; }
4536if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : 4542if test "${ac_cv_search_gethostbyname+set}" = set; then :
4537 $as_echo_n "(cached) " >&6 4543 $as_echo_n "(cached) " >&6
4538else 4544else
4539 ac_check_lib_save_LIBS=$LIBS 4545 ac_func_search_save_LIBS=$LIBS
4540LIBS="-lnsl $LIBS"
4541cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4546cat 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
4554return gethostbyname (); 4559return gethostbyname ();
4555 ; 4560 ;
4556 return 0; 4561 return 0;
4557} 4562}
4558_ACEOF 4563_ACEOF
4564for 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
4559if 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
4561else
4562 ac_cv_lib_nsl_gethostbyname=no
4563fi 4573fi
4564rm -f core conftest.err conftest.$ac_objext \ 4574rm -f core conftest.err conftest.$ac_objext \
4565 conftest$ac_exeext conftest.$ac_ext 4575 conftest$ac_exeext
4566LIBS=$ac_check_lib_save_LIBS 4576 if test "${ac_cv_search_gethostbyname+set}" = set; then :
4577 break
4567fi 4578fi
4579done
4580if test "${ac_cv_search_gethostbyname+set}" = set; then :
4581
4582else
4583 ac_cv_search_gethostbyname=no
4584fi
4585rm conftest.$ac_ext
4586LIBS=$ac_func_search_save_LIBS
4587fi
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; }
4570if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : 4590ac_res=$ac_cv_search_gethostbyname
4571 LIBS="$LIBS -lnsl" 4591if test "$ac_res" != no; then :
4572fi 4592 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4573 4593
4574fi 4594fi
4575 4595
4576ac_fn_cxx_check_func "$LINENO" "socket" "ac_cv_func_socket"
4577if test "x$ac_cv_func_socket" = x""yes; then :
4578
4579else
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; }
4582if test "${ac_cv_lib_socket_socket+set}" = set; then : 4598if test "${ac_cv_search_socket+set}" = set; then :
4583 $as_echo_n "(cached) " >&6 4599 $as_echo_n "(cached) " >&6
4584else 4600else
4585 ac_check_lib_save_LIBS=$LIBS 4601 ac_func_search_save_LIBS=$LIBS
4586LIBS="-lsocket $LIBS"
4587cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4602cat 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
4600return socket (); 4615return socket ();
4601 ; 4616 ;
4602 return 0; 4617 return 0;
4603} 4618}
4604_ACEOF 4619_ACEOF
4620for 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
4605if 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
4607else
4608 ac_cv_lib_socket_socket=no
4609fi 4629fi
4610rm -f core conftest.err conftest.$ac_objext \ 4630rm -f core conftest.err conftest.$ac_objext \
4611 conftest$ac_exeext conftest.$ac_ext 4631 conftest$ac_exeext
4612LIBS=$ac_check_lib_save_LIBS 4632 if test "${ac_cv_search_socket+set}" = set; then :
4633 break
4613fi 4634fi
4635done
4636if test "${ac_cv_search_socket+set}" = set; then :
4637
4638else
4639 ac_cv_search_socket=no
4640fi
4641rm conftest.$ac_ext
4642LIBS=$ac_func_search_save_LIBS
4643fi
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; }
4616if test "x$ac_cv_lib_socket_socket" = x""yes; then : 4646ac_res=$ac_cv_search_socket
4617 LIBS="$LIBS -lsocket" 4647if test "$ac_res" != no; then :
4618fi 4648 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4619 4649
4620fi 4650fi
4621 4651
4622 4652
4623support_frills=yes 4653support_frills=yes
6907_ACEOF 6937_ACEOF
6908 6938
6909fi 6939fi
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; }
6914if test "${pt_cv_path_utmpx+set}" = set; then :
6915 $as_echo_n "(cached) " >&6
6916else
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;}
6920else
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
6932main()
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
6961if ac_fn_cxx_try_run "$LINENO"; then :
6962 pt_cv_path_utmpx=`cat conftestval`
6963else
6964 pt_cv_path_utmpx=
6965fi
6966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6967 conftest.$ac_objext conftest.beam conftest.$ac_ext
6968fi
6969
6970fi
6971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_utmpx" >&5
6972$as_echo "$pt_cv_path_utmpx" >&6; }
6973if test x$pt_cv_path_utmpx != x; then
6974
6975cat >>confdefs.h <<_ACEOF
6976#define UTMPX_FILE "$pt_cv_path_utmpx"
6977_ACEOF
6978
6979fi
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; }
6984if test "${pt_cv_path_wtmp+set}" = set; then : 6944if test "${pt_cv_path_wtmp+set}" = set; then :
6985 $as_echo_n "(cached) " >&6 6945 $as_echo_n "(cached) " >&6
6986else 6946else
7514done 7474done
7515 7475
7516 7476
7517have_clone=no 7477have_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; }
7521if 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
7531else
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533$as_echo "no" >&6; }
7534fi
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; }
7538if test -e /dev/ptc; then 7481if 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
7548else 7488else
7605rm -f core conftest.err conftest.$ac_objext \ 7545rm -f core conftest.err conftest.$ac_objext \
7606 conftest$ac_exeext conftest.$ac_ext 7546 conftest$ac_exeext conftest.$ac_ext
7607fi 7547fi
7608 7548
7609if test -z "$unix98_pty"; then 7549if test -z "$unix98_pty"; then
7610 for ac_func in openpty
7611do :
7612 ac_fn_cxx_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
7613if test "x$ac_cv_func_openpty" = x""yes; then :
7614 cat >>confdefs.h <<_ACEOF
7615#define HAVE_OPENPTY 1
7616_ACEOF
7617
7618else
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; }
7621if test "${ac_cv_lib_util_openpty+set}" = set; then : 7552if test "${ac_cv_search_openpty+set}" = set; then :
7622 $as_echo_n "(cached) " >&6 7553 $as_echo_n "(cached) " >&6
7623else 7554else
7624 ac_check_lib_save_LIBS=$LIBS 7555 ac_func_search_save_LIBS=$LIBS
7625LIBS="-lutil $LIBS"
7626cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7556cat 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
7639return openpty (); 7569return openpty ();
7640 ; 7570 ;
7641 return 0; 7571 return 0;
7642} 7572}
7643_ACEOF 7573_ACEOF
7574for 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
7644if 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
7646else
7647 ac_cv_lib_util_openpty=no
7648fi 7583fi
7649rm -f core conftest.err conftest.$ac_objext \ 7584rm -f core conftest.err conftest.$ac_objext \
7650 conftest$ac_exeext conftest.$ac_ext 7585 conftest$ac_exeext
7651LIBS=$ac_check_lib_save_LIBS 7586 if test "${ac_cv_search_openpty+set}" = set; then :
7652fi 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; }
7655if test "x$ac_cv_lib_util_openpty" = x""yes; then :
7656 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
7657 LIBS="$LIBS -lutil"
7658fi
7659
7660fi 7588fi
7661done 7589done
7590if test "${ac_cv_search_openpty+set}" = set; then :
7591
7592else
7593 ac_cv_search_openpty=no
7594fi
7595rm conftest.$ac_ext
7596LIBS=$ac_func_search_save_LIBS
7597fi
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
7599$as_echo "$ac_cv_search_openpty" >&6; }
7600ac_res=$ac_cv_search_openpty
7601if 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
7606fi
7662 7607
7663fi 7608fi
7664 7609
7665 7610
7666 7611

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines