comparison configure @ 2061:966ef0eeed4f

GTK: Fix building on FreeBSD 12. Needs -lm and -lX11 added to LIBS.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 16 Apr 2020 13:34:36 +0000
parents a17cc1958369
children 1a93c508bb51
comparison
equal deleted inserted replaced
2060:21bc72ff40cb 2061:966ef0eeed4f
653 GTK_CONFIG 653 GTK_CONFIG
654 GLIB_LIBS 654 GLIB_LIBS
655 GLIB_CFLAGS 655 GLIB_CFLAGS
656 GLIB_CONFIG 656 GLIB_CONFIG
657 PKG_CFG 657 PKG_CFG
658 X_EXTRA_LIBS
659 X_LIBS
660 X_PRE_LIBS
661 X_CFLAGS
662 XMKMF
658 EGREP 663 EGREP
659 GREP 664 GREP
660 CPP 665 CPP
661 target_os 666 target_os
662 target_vendor 667 target_vendor
704 htmldir 709 htmldir
705 infodir 710 infodir
706 docdir 711 docdir
707 oldincludedir 712 oldincludedir
708 includedir 713 includedir
709 runstatedir
710 localstatedir 714 localstatedir
711 sharedstatedir 715 sharedstatedir
712 sysconfdir 716 sysconfdir
713 datadir 717 datadir
714 datarootdir 718 datarootdir
731 enable_option_checking 735 enable_option_checking
732 with_dwcompat 736 with_dwcompat
733 with_gtk2 737 with_gtk2
734 with_deprecated 738 with_deprecated
735 with_arch 739 with_arch
740 with_x
736 with_glib_prefix 741 with_glib_prefix
737 with_glib_exec_prefix 742 with_glib_exec_prefix
738 enable_glibtest 743 enable_glibtest
739 with_gtk_prefix 744 with_gtk_prefix
740 with_gtk_exec_prefix 745 with_gtk_exec_prefix
752 LIBS 757 LIBS
753 CPPFLAGS 758 CPPFLAGS
754 CXX 759 CXX
755 CXXFLAGS 760 CXXFLAGS
756 CCC 761 CCC
757 CPP' 762 CPP
763 XMKMF'
758 764
759 765
760 # Initialize some variables set by options. 766 # Initialize some variables set by options.
761 ac_init_help= 767 ac_init_help=
762 ac_init_version=false 768 ac_init_version=false
791 datarootdir='${prefix}/share' 797 datarootdir='${prefix}/share'
792 datadir='${datarootdir}' 798 datadir='${datarootdir}'
793 sysconfdir='${prefix}/etc' 799 sysconfdir='${prefix}/etc'
794 sharedstatedir='${prefix}/com' 800 sharedstatedir='${prefix}/com'
795 localstatedir='${prefix}/var' 801 localstatedir='${prefix}/var'
796 runstatedir='${localstatedir}/run'
797 includedir='${prefix}/include' 802 includedir='${prefix}/include'
798 oldincludedir='/usr/include' 803 oldincludedir='/usr/include'
799 docdir='${datarootdir}/doc/${PACKAGE}' 804 docdir='${datarootdir}/doc/${PACKAGE}'
800 infodir='${datarootdir}/info' 805 infodir='${datarootdir}/info'
801 htmldir='${docdir}' 806 htmldir='${docdir}'
1044 1049
1045 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1046 | -silent | --silent | --silen | --sile | --sil) 1051 | -silent | --silent | --silen | --sile | --sil)
1047 silent=yes ;; 1052 silent=yes ;;
1048 1053
1049 -runstatedir | --runstatedir | --runstatedi | --runstated \
1050 | --runstate | --runstat | --runsta | --runst | --runs \
1051 | --run | --ru | --r)
1052 ac_prev=runstatedir ;;
1053 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1054 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1055 | --run=* | --ru=* | --r=*)
1056 runstatedir=$ac_optarg ;;
1057
1058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1054 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;; 1055 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1056 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*) 1057 | --sbi=* | --sb=*)
1062 sbindir=$ac_optarg ;; 1058 sbindir=$ac_optarg ;;
1190 1186
1191 # Check all directory arguments for consistency. 1187 # Check all directory arguments for consistency.
1192 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1188 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \ 1189 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1190 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir runstatedir 1191 libdir localedir mandir
1196 do 1192 do
1197 eval ac_val=\$$ac_var 1193 eval ac_val=\$$ac_var
1198 # Remove trailing slashes. 1194 # Remove trailing slashes.
1199 case $ac_val in 1195 case $ac_val in
1200 */ ) 1196 */ )
1343 --sbindir=DIR system admin executables [EPREFIX/sbin] 1339 --sbindir=DIR system admin executables [EPREFIX/sbin]
1344 --libexecdir=DIR program executables [EPREFIX/libexec] 1340 --libexecdir=DIR program executables [EPREFIX/libexec]
1345 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1341 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1346 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1342 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1347 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1343 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1348 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1349 --libdir=DIR object code libraries [EPREFIX/lib] 1344 --libdir=DIR object code libraries [EPREFIX/lib]
1350 --includedir=DIR C header files [PREFIX/include] 1345 --includedir=DIR C header files [PREFIX/include]
1351 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1346 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1352 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1347 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1353 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1348 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --psdir=DIR ps documentation [DOCDIR] 1356 --psdir=DIR ps documentation [DOCDIR]
1362 _ACEOF 1357 _ACEOF
1363 1358
1364 cat <<\_ACEOF 1359 cat <<\_ACEOF
1365 1360
1361 X features:
1362 --x-includes=DIR X include files are in DIR
1363 --x-libraries=DIR X library files are in DIR
1364
1366 System types: 1365 System types:
1367 --build=BUILD configure for building on BUILD [guessed] 1366 --build=BUILD configure for building on BUILD [guessed]
1368 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1367 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1369 --target=TARGET configure for building compilers for TARGET [HOST] 1368 --target=TARGET configure for building compilers for TARGET [HOST]
1370 _ACEOF 1369 _ACEOF
1387 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1386 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1388 --with-dwcompat specify this to build the optional dwcompat library 1387 --with-dwcompat specify this to build the optional dwcompat library
1389 --with-gtk2 specify this to build with GTK+ 2.x if available 1388 --with-gtk2 specify this to build with GTK+ 2.x if available
1390 --with-deprecated specify this to build with deprecated functions 1389 --with-deprecated specify this to build with deprecated functions
1391 --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386 1390 --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386
1391 --with-x use the X Window System
1392 --with-glib-prefix=PFX Prefix where GLIB is installed (optional) 1392 --with-glib-prefix=PFX Prefix where GLIB is installed (optional)
1393 --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional) 1393 --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)
1394 --with-gtk-prefix=PFX Prefix where GTK is installed (optional) 1394 --with-gtk-prefix=PFX Prefix where GTK is installed (optional)
1395 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) 1395 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)
1396 --with-imlib-prefix=PFX Prefix where IMLIB is installed (optional) 1396 --with-imlib-prefix=PFX Prefix where IMLIB is installed (optional)
1405 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1405 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1406 you have headers in a nonstandard directory <include dir> 1406 you have headers in a nonstandard directory <include dir>
1407 CXX C++ compiler command 1407 CXX C++ compiler command
1408 CXXFLAGS C++ compiler flags 1408 CXXFLAGS C++ compiler flags
1409 CPP C preprocessor 1409 CPP C preprocessor
1410 XMKMF Path to xmkmf, Makefile generator for X Window System
1410 1411
1411 Use these variables to override the choices made by `configure' or to help 1412 Use these variables to override the choices made by `configure' or to help
1412 it to find libraries and programs with nonstandard names/locations. 1413 it to find libraries and programs with nonstandard names/locations.
1413 1414
1414 Report bugs to the package provider. 1415 Report bugs to the package provider.
4564 fi 4565 fi
4565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_gethostbyname" >&5 4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_gethostbyname" >&5
4566 $as_echo "$ac_cv_lib_resolv_gethostbyname" >&6; } 4567 $as_echo "$ac_cv_lib_resolv_gethostbyname" >&6; }
4567 if test "x$ac_cv_lib_resolv_gethostbyname" = xyes; then : 4568 if test "x$ac_cv_lib_resolv_gethostbyname" = xyes; then :
4568 LIBS="$LIBS -lresolv" 4569 LIBS="$LIBS -lresolv"
4570 fi
4571
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2 in -lm" >&5
4573 $as_echo_n "checking for atan2 in -lm... " >&6; }
4574 if ${ac_cv_lib_m_atan2+:} false; then :
4575 $as_echo_n "(cached) " >&6
4576 else
4577 ac_check_lib_save_LIBS=$LIBS
4578 LIBS="-lm $LIBS"
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580 /* end confdefs.h. */
4581
4582 /* Override any GCC internal prototype to avoid an error.
4583 Use char because int might match the return type of a GCC
4584 builtin and then its argument prototype would still apply. */
4585 #ifdef __cplusplus
4586 extern "C"
4587 #endif
4588 char atan2 ();
4589 int
4590 main ()
4591 {
4592 return atan2 ();
4593 ;
4594 return 0;
4595 }
4596 _ACEOF
4597 if ac_fn_c_try_link "$LINENO"; then :
4598 ac_cv_lib_m_atan2=yes
4599 else
4600 ac_cv_lib_m_atan2=no
4601 fi
4602 rm -f core conftest.err conftest.$ac_objext \
4603 conftest$ac_exeext conftest.$ac_ext
4604 LIBS=$ac_check_lib_save_LIBS
4605 fi
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_atan2" >&5
4607 $as_echo "$ac_cv_lib_m_atan2" >&6; }
4608 if test "x$ac_cv_lib_m_atan2" = xyes; then :
4609 LIBS="$LIBS -lm"
4569 fi 4610 fi
4570 4611
4571 4612
4572 build_gtk="yes" 4613 build_gtk="yes"
4573 check_pthreads="yes" 4614 check_pthreads="yes"
4640 *) 4681 *)
4641 ;; 4682 ;;
4642 esac 4683 esac
4643 4684
4644 if test $build_gtk = "yes"; then 4685 if test $build_gtk = "yes"; then
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
4687 $as_echo_n "checking for X... " >&6; }
4688
4689
4690 # Check whether --with-x was given.
4691 if test "${with_x+set}" = set; then :
4692 withval=$with_x;
4693 fi
4694
4695 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4696 if test "x$with_x" = xno; then
4697 # The user explicitly disabled X.
4698 have_x=disabled
4699 else
4700 case $x_includes,$x_libraries in #(
4701 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
4702 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
4703 $as_echo_n "(cached) " >&6
4704 else
4705 # One or both of the vars are not set, and there is no cached value.
4706 ac_x_includes=no ac_x_libraries=no
4707 rm -f -r conftest.dir
4708 if mkdir conftest.dir; then
4709 cd conftest.dir
4710 cat >Imakefile <<'_ACEOF'
4711 incroot:
4712 @echo incroot='${INCROOT}'
4713 usrlibdir:
4714 @echo usrlibdir='${USRLIBDIR}'
4715 libdir:
4716 @echo libdir='${LIBDIR}'
4717 _ACEOF
4718 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
4719 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4720 for ac_var in incroot usrlibdir libdir; do
4721 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
4722 done
4723 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4724 for ac_extension in a so sl dylib la dll; do
4725 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
4726 test -f "$ac_im_libdir/libX11.$ac_extension"; then
4727 ac_im_usrlibdir=$ac_im_libdir; break
4728 fi
4729 done
4730 # Screen out bogus values from the imake configuration. They are
4731 # bogus both because they are the default anyway, and because
4732 # using them would break gcc on systems where it needs fixed includes.
4733 case $ac_im_incroot in
4734 /usr/include) ac_x_includes= ;;
4735 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4736 esac
4737 case $ac_im_usrlibdir in
4738 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
4739 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4740 esac
4741 fi
4742 cd ..
4743 rm -f -r conftest.dir
4744 fi
4745
4746 # Standard set of common directories for X headers.
4747 # Check X11 before X11Rn because it is often a symlink to the current release.
4748 ac_x_header_dirs='
4749 /usr/X11/include
4750 /usr/X11R7/include
4751 /usr/X11R6/include
4752 /usr/X11R5/include
4753 /usr/X11R4/include
4754
4755 /usr/include/X11
4756 /usr/include/X11R7
4757 /usr/include/X11R6
4758 /usr/include/X11R5
4759 /usr/include/X11R4
4760
4761 /usr/local/X11/include
4762 /usr/local/X11R7/include
4763 /usr/local/X11R6/include
4764 /usr/local/X11R5/include
4765 /usr/local/X11R4/include
4766
4767 /usr/local/include/X11
4768 /usr/local/include/X11R7
4769 /usr/local/include/X11R6
4770 /usr/local/include/X11R5
4771 /usr/local/include/X11R4
4772
4773 /usr/X386/include
4774 /usr/x386/include
4775 /usr/XFree86/include/X11
4776
4777 /usr/include
4778 /usr/local/include
4779 /usr/unsupported/include
4780 /usr/athena/include
4781 /usr/local/x11r5/include
4782 /usr/lpp/Xamples/include
4783
4784 /usr/openwin/include
4785 /usr/openwin/share/include'
4786
4787 if test "$ac_x_includes" = no; then
4788 # Guess where to find include files, by looking for Xlib.h.
4789 # First, try using that file with no special directory specified.
4790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4791 /* end confdefs.h. */
4792 #include <X11/Xlib.h>
4793 _ACEOF
4794 if ac_fn_c_try_cpp "$LINENO"; then :
4795 # We can compile using X headers with no special include directory.
4796 ac_x_includes=
4797 else
4798 for ac_dir in $ac_x_header_dirs; do
4799 if test -r "$ac_dir/X11/Xlib.h"; then
4800 ac_x_includes=$ac_dir
4801 break
4802 fi
4803 done
4804 fi
4805 rm -f conftest.err conftest.i conftest.$ac_ext
4806 fi # $ac_x_includes = no
4807
4808 if test "$ac_x_libraries" = no; then
4809 # Check for the libraries.
4810 # See if we find them without any special options.
4811 # Don't add to $LIBS permanently.
4812 ac_save_LIBS=$LIBS
4813 LIBS="-lX11 $LIBS"
4814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815 /* end confdefs.h. */
4816 #include <X11/Xlib.h>
4817 int
4818 main ()
4819 {
4820 XrmInitialize ()
4821 ;
4822 return 0;
4823 }
4824 _ACEOF
4825 if ac_fn_c_try_link "$LINENO"; then :
4826 LIBS=$ac_save_LIBS
4827 # We can link X programs with no special library path.
4828 ac_x_libraries=
4829 else
4830 LIBS=$ac_save_LIBS
4831 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4832 do
4833 # Don't even attempt the hair of trying to link an X program!
4834 for ac_extension in a so sl dylib la dll; do
4835 if test -r "$ac_dir/libX11.$ac_extension"; then
4836 ac_x_libraries=$ac_dir
4837 break 2
4838 fi
4839 done
4840 done
4841 fi
4842 rm -f core conftest.err conftest.$ac_objext \
4843 conftest$ac_exeext conftest.$ac_ext
4844 fi # $ac_x_libraries = no
4845
4846 case $ac_x_includes,$ac_x_libraries in #(
4847 no,* | *,no | *\'*)
4848 # Didn't find X, or a directory has "'" in its name.
4849 ac_cv_have_x="have_x=no";; #(
4850 *)
4851 # Record where we found X for the cache.
4852 ac_cv_have_x="have_x=yes\
4853 ac_x_includes='$ac_x_includes'\
4854 ac_x_libraries='$ac_x_libraries'"
4855 esac
4856 fi
4857 ;; #(
4858 *) have_x=yes;;
4859 esac
4860 eval "$ac_cv_have_x"
4861 fi # $with_x != no
4862
4863 if test "$have_x" != yes; then
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
4865 $as_echo "$have_x" >&6; }
4866 no_x=yes
4867 else
4868 # If each of the values was on the command line, it overrides each guess.
4869 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4870 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4871 # Update the cache value to reflect the command line values.
4872 ac_cv_have_x="have_x=yes\
4873 ac_x_includes='$x_includes'\
4874 ac_x_libraries='$x_libraries'"
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
4876 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
4877 fi
4878
4879 if test "$no_x" = yes; then
4880 # Not all programs may use this symbol, but it does not hurt to define it.
4881
4882 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
4883
4884 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4885 else
4886 if test -n "$x_includes"; then
4887 X_CFLAGS="$X_CFLAGS -I$x_includes"
4888 fi
4889
4890 # It would also be nice to do this for all -L options, not just this one.
4891 if test -n "$x_libraries"; then
4892 X_LIBS="$X_LIBS -L$x_libraries"
4893 # For Solaris; some versions of Sun CC require a space after -R and
4894 # others require no space. Words are not sufficient . . . .
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
4896 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
4897 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4898 ac_xsave_c_werror_flag=$ac_c_werror_flag
4899 ac_c_werror_flag=yes
4900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4901 /* end confdefs.h. */
4902
4903 int
4904 main ()
4905 {
4906
4907 ;
4908 return 0;
4909 }
4910 _ACEOF
4911 if ac_fn_c_try_link "$LINENO"; then :
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913 $as_echo "no" >&6; }
4914 X_LIBS="$X_LIBS -R$x_libraries"
4915 else
4916 LIBS="$ac_xsave_LIBS -R $x_libraries"
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918 /* end confdefs.h. */
4919
4920 int
4921 main ()
4922 {
4923
4924 ;
4925 return 0;
4926 }
4927 _ACEOF
4928 if ac_fn_c_try_link "$LINENO"; then :
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4930 $as_echo "yes" >&6; }
4931 X_LIBS="$X_LIBS -R $x_libraries"
4932 else
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
4934 $as_echo "neither works" >&6; }
4935 fi
4936 rm -f core conftest.err conftest.$ac_objext \
4937 conftest$ac_exeext conftest.$ac_ext
4938 fi
4939 rm -f core conftest.err conftest.$ac_objext \
4940 conftest$ac_exeext conftest.$ac_ext
4941 ac_c_werror_flag=$ac_xsave_c_werror_flag
4942 LIBS=$ac_xsave_LIBS
4943 fi
4944
4945 # Check for system-dependent libraries X programs must link with.
4946 # Do this before checking for the system-independent R6 libraries
4947 # (-lICE), since we may need -lsocket or whatever for X linking.
4948
4949 if test "$ISC" = yes; then
4950 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4951 else
4952 # Martyn Johnson says this is needed for Ultrix, if the X
4953 # libraries were built with DECnet support. And Karl Berry says
4954 # the Alpha needs dnet_stub (dnet does not exist).
4955 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
4956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4957 /* end confdefs.h. */
4958
4959 /* Override any GCC internal prototype to avoid an error.
4960 Use char because int might match the return type of a GCC
4961 builtin and then its argument prototype would still apply. */
4962 #ifdef __cplusplus
4963 extern "C"
4964 #endif
4965 char XOpenDisplay ();
4966 int
4967 main ()
4968 {
4969 return XOpenDisplay ();
4970 ;
4971 return 0;
4972 }
4973 _ACEOF
4974 if ac_fn_c_try_link "$LINENO"; then :
4975
4976 else
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
4978 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
4979 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
4980 $as_echo_n "(cached) " >&6
4981 else
4982 ac_check_lib_save_LIBS=$LIBS
4983 LIBS="-ldnet $LIBS"
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 /* end confdefs.h. */
4986
4987 /* Override any GCC internal prototype to avoid an error.
4988 Use char because int might match the return type of a GCC
4989 builtin and then its argument prototype would still apply. */
4990 #ifdef __cplusplus
4991 extern "C"
4992 #endif
4993 char dnet_ntoa ();
4994 int
4995 main ()
4996 {
4997 return dnet_ntoa ();
4998 ;
4999 return 0;
5000 }
5001 _ACEOF
5002 if ac_fn_c_try_link "$LINENO"; then :
5003 ac_cv_lib_dnet_dnet_ntoa=yes
5004 else
5005 ac_cv_lib_dnet_dnet_ntoa=no
5006 fi
5007 rm -f core conftest.err conftest.$ac_objext \
5008 conftest$ac_exeext conftest.$ac_ext
5009 LIBS=$ac_check_lib_save_LIBS
5010 fi
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5012 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
5013 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
5014 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5015 fi
5016
5017 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
5019 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
5020 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
5021 $as_echo_n "(cached) " >&6
5022 else
5023 ac_check_lib_save_LIBS=$LIBS
5024 LIBS="-ldnet_stub $LIBS"
5025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5026 /* end confdefs.h. */
5027
5028 /* Override any GCC internal prototype to avoid an error.
5029 Use char because int might match the return type of a GCC
5030 builtin and then its argument prototype would still apply. */
5031 #ifdef __cplusplus
5032 extern "C"
5033 #endif
5034 char dnet_ntoa ();
5035 int
5036 main ()
5037 {
5038 return dnet_ntoa ();
5039 ;
5040 return 0;
5041 }
5042 _ACEOF
5043 if ac_fn_c_try_link "$LINENO"; then :
5044 ac_cv_lib_dnet_stub_dnet_ntoa=yes
5045 else
5046 ac_cv_lib_dnet_stub_dnet_ntoa=no
5047 fi
5048 rm -f core conftest.err conftest.$ac_objext \
5049 conftest$ac_exeext conftest.$ac_ext
5050 LIBS=$ac_check_lib_save_LIBS
5051 fi
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5053 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
5054 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
5055 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5056 fi
5057
5058 fi
5059 fi
5060 rm -f core conftest.err conftest.$ac_objext \
5061 conftest$ac_exeext conftest.$ac_ext
5062 LIBS="$ac_xsave_LIBS"
5063
5064 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5065 # to get the SysV transport functions.
5066 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5067 # needs -lnsl.
5068 # The nsl library prevents programs from opening the X display
5069 # on Irix 5.2, according to T.E. Dickey.
5070 # The functions gethostbyname, getservbyname, and inet_addr are
5071 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5072 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
5073 if test "x$ac_cv_func_gethostbyname" = xyes; then :
5074
5075 fi
5076
5077 if test $ac_cv_func_gethostbyname = no; then
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
5079 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5080 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
5081 $as_echo_n "(cached) " >&6
5082 else
5083 ac_check_lib_save_LIBS=$LIBS
5084 LIBS="-lnsl $LIBS"
5085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5086 /* end confdefs.h. */
5087
5088 /* Override any GCC internal prototype to avoid an error.
5089 Use char because int might match the return type of a GCC
5090 builtin and then its argument prototype would still apply. */
5091 #ifdef __cplusplus
5092 extern "C"
5093 #endif
5094 char gethostbyname ();
5095 int
5096 main ()
5097 {
5098 return gethostbyname ();
5099 ;
5100 return 0;
5101 }
5102 _ACEOF
5103 if ac_fn_c_try_link "$LINENO"; then :
5104 ac_cv_lib_nsl_gethostbyname=yes
5105 else
5106 ac_cv_lib_nsl_gethostbyname=no
5107 fi
5108 rm -f core conftest.err conftest.$ac_objext \
5109 conftest$ac_exeext conftest.$ac_ext
5110 LIBS=$ac_check_lib_save_LIBS
5111 fi
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
5113 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5114 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
5115 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5116 fi
5117
5118 if test $ac_cv_lib_nsl_gethostbyname = no; then
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
5120 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
5121 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
5122 $as_echo_n "(cached) " >&6
5123 else
5124 ac_check_lib_save_LIBS=$LIBS
5125 LIBS="-lbsd $LIBS"
5126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5127 /* end confdefs.h. */
5128
5129 /* Override any GCC internal prototype to avoid an error.
5130 Use char because int might match the return type of a GCC
5131 builtin and then its argument prototype would still apply. */
5132 #ifdef __cplusplus
5133 extern "C"
5134 #endif
5135 char gethostbyname ();
5136 int
5137 main ()
5138 {
5139 return gethostbyname ();
5140 ;
5141 return 0;
5142 }
5143 _ACEOF
5144 if ac_fn_c_try_link "$LINENO"; then :
5145 ac_cv_lib_bsd_gethostbyname=yes
5146 else
5147 ac_cv_lib_bsd_gethostbyname=no
5148 fi
5149 rm -f core conftest.err conftest.$ac_objext \
5150 conftest$ac_exeext conftest.$ac_ext
5151 LIBS=$ac_check_lib_save_LIBS
5152 fi
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
5154 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
5155 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
5156 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5157 fi
5158
5159 fi
5160 fi
5161
5162 # lieder@skyler.mavd.honeywell.com says without -lsocket,
5163 # socket/setsockopt and other routines are undefined under SCO ODT
5164 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
5165 # on later versions), says Simon Leinen: it contains gethostby*
5166 # variants that don't use the name server (or something). -lsocket
5167 # must be given before -lnsl if both are needed. We assume that
5168 # if connect needs -lnsl, so does gethostbyname.
5169 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
5170 if test "x$ac_cv_func_connect" = xyes; then :
5171
5172 fi
5173
5174 if test $ac_cv_func_connect = no; then
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
5176 $as_echo_n "checking for connect in -lsocket... " >&6; }
5177 if ${ac_cv_lib_socket_connect+:} false; then :
5178 $as_echo_n "(cached) " >&6
5179 else
5180 ac_check_lib_save_LIBS=$LIBS
5181 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5183 /* end confdefs.h. */
5184
5185 /* Override any GCC internal prototype to avoid an error.
5186 Use char because int might match the return type of a GCC
5187 builtin and then its argument prototype would still apply. */
5188 #ifdef __cplusplus
5189 extern "C"
5190 #endif
5191 char connect ();
5192 int
5193 main ()
5194 {
5195 return connect ();
5196 ;
5197 return 0;
5198 }
5199 _ACEOF
5200 if ac_fn_c_try_link "$LINENO"; then :
5201 ac_cv_lib_socket_connect=yes
5202 else
5203 ac_cv_lib_socket_connect=no
5204 fi
5205 rm -f core conftest.err conftest.$ac_objext \
5206 conftest$ac_exeext conftest.$ac_ext
5207 LIBS=$ac_check_lib_save_LIBS
5208 fi
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
5210 $as_echo "$ac_cv_lib_socket_connect" >&6; }
5211 if test "x$ac_cv_lib_socket_connect" = xyes; then :
5212 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5213 fi
5214
5215 fi
5216
5217 # Guillermo Gomez says -lposix is necessary on A/UX.
5218 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
5219 if test "x$ac_cv_func_remove" = xyes; then :
5220
5221 fi
5222
5223 if test $ac_cv_func_remove = no; then
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
5225 $as_echo_n "checking for remove in -lposix... " >&6; }
5226 if ${ac_cv_lib_posix_remove+:} false; then :
5227 $as_echo_n "(cached) " >&6
5228 else
5229 ac_check_lib_save_LIBS=$LIBS
5230 LIBS="-lposix $LIBS"
5231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5232 /* end confdefs.h. */
5233
5234 /* Override any GCC internal prototype to avoid an error.
5235 Use char because int might match the return type of a GCC
5236 builtin and then its argument prototype would still apply. */
5237 #ifdef __cplusplus
5238 extern "C"
5239 #endif
5240 char remove ();
5241 int
5242 main ()
5243 {
5244 return remove ();
5245 ;
5246 return 0;
5247 }
5248 _ACEOF
5249 if ac_fn_c_try_link "$LINENO"; then :
5250 ac_cv_lib_posix_remove=yes
5251 else
5252 ac_cv_lib_posix_remove=no
5253 fi
5254 rm -f core conftest.err conftest.$ac_objext \
5255 conftest$ac_exeext conftest.$ac_ext
5256 LIBS=$ac_check_lib_save_LIBS
5257 fi
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
5259 $as_echo "$ac_cv_lib_posix_remove" >&6; }
5260 if test "x$ac_cv_lib_posix_remove" = xyes; then :
5261 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5262 fi
5263
5264 fi
5265
5266 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5267 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
5268 if test "x$ac_cv_func_shmat" = xyes; then :
5269
5270 fi
5271
5272 if test $ac_cv_func_shmat = no; then
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
5274 $as_echo_n "checking for shmat in -lipc... " >&6; }
5275 if ${ac_cv_lib_ipc_shmat+:} false; then :
5276 $as_echo_n "(cached) " >&6
5277 else
5278 ac_check_lib_save_LIBS=$LIBS
5279 LIBS="-lipc $LIBS"
5280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281 /* end confdefs.h. */
5282
5283 /* Override any GCC internal prototype to avoid an error.
5284 Use char because int might match the return type of a GCC
5285 builtin and then its argument prototype would still apply. */
5286 #ifdef __cplusplus
5287 extern "C"
5288 #endif
5289 char shmat ();
5290 int
5291 main ()
5292 {
5293 return shmat ();
5294 ;
5295 return 0;
5296 }
5297 _ACEOF
5298 if ac_fn_c_try_link "$LINENO"; then :
5299 ac_cv_lib_ipc_shmat=yes
5300 else
5301 ac_cv_lib_ipc_shmat=no
5302 fi
5303 rm -f core conftest.err conftest.$ac_objext \
5304 conftest$ac_exeext conftest.$ac_ext
5305 LIBS=$ac_check_lib_save_LIBS
5306 fi
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
5308 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
5309 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
5310 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5311 fi
5312
5313 fi
5314 fi
5315
5316 # Check for libraries that X11R6 Xt/Xaw programs need.
5317 ac_save_LDFLAGS=$LDFLAGS
5318 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5319 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5320 # check for ICE first), but we must link in the order -lSM -lICE or
5321 # we get undefined symbols. So assume we have SM if we have ICE.
5322 # These have to be linked with before -lX11, unlike the other
5323 # libraries we check for below, so use a different variable.
5324 # John Interrante, Karl Berry
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
5326 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
5327 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
5328 $as_echo_n "(cached) " >&6
5329 else
5330 ac_check_lib_save_LIBS=$LIBS
5331 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5333 /* end confdefs.h. */
5334
5335 /* Override any GCC internal prototype to avoid an error.
5336 Use char because int might match the return type of a GCC
5337 builtin and then its argument prototype would still apply. */
5338 #ifdef __cplusplus
5339 extern "C"
5340 #endif
5341 char IceConnectionNumber ();
5342 int
5343 main ()
5344 {
5345 return IceConnectionNumber ();
5346 ;
5347 return 0;
5348 }
5349 _ACEOF
5350 if ac_fn_c_try_link "$LINENO"; then :
5351 ac_cv_lib_ICE_IceConnectionNumber=yes
5352 else
5353 ac_cv_lib_ICE_IceConnectionNumber=no
5354 fi
5355 rm -f core conftest.err conftest.$ac_objext \
5356 conftest$ac_exeext conftest.$ac_ext
5357 LIBS=$ac_check_lib_save_LIBS
5358 fi
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5360 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
5361 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
5362 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5363 fi
5364
5365 LDFLAGS=$ac_save_LDFLAGS
5366
5367 fi
5368
5369 LIBS="$LIBS $X_LIBS -lX11"
4645 # Extract the first word of "pkg-config", so it can be a program name with args. 5370 # Extract the first word of "pkg-config", so it can be a program name with args.
4646 set dummy pkg-config; ac_word=$2 5371 set dummy pkg-config; ac_word=$2
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648 $as_echo_n "checking for $ac_word... " >&6; } 5373 $as_echo_n "checking for $ac_word... " >&6; }
4649 if ${ac_cv_prog_PKG_CFG+:} false; then : 5374 if ${ac_cv_prog_PKG_CFG+:} false; then :