2 dnl See if there is any X11 present
6 AC_DEFUN([KRB_CHECK_X],[
9 # try to figure out if we need any additional ld flags, like -R
10 # and yes, the autoconf X test is utterly broken
11 if test "$no_x" != yes; then
12 AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[
14 ac_save_cflags="$CFLAGS"
15 CFLAGS="$CFLAGS $X_CFLAGS"
16 krb_cv_sys_x_libs_rpath=""
18 for rflag in "" "-R" "-R " "-rpath "; do
19 if test "$rflag" = ""; then
23 for flag in $X_LIBS; do
26 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
34 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
45 ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:)
48 CFLAGS="$ac_save_cflags"
50 X_LIBS="$krb_cv_sys_x_libs"