2 dnl See if there is any X11 present
4 dnl $Heimdal: check-x.m4 15435 2005-06-16 19:45:52Z lha $
7 AC_DEFUN([KRB_CHECK_X],[
10 # try to figure out if we need any additional ld flags, like -R
11 # and yes, the autoconf X test is utterly broken
12 if test "$no_x" != yes; then
13 AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[
15 ac_save_cflags="$CFLAGS"
16 CFLAGS="$CFLAGS $X_CFLAGS"
17 krb_cv_sys_x_libs_rpath=""
19 for rflag in "" "-R" "-R " "-rpath "; do
20 if test "$rflag" = ""; then
24 for flag in $X_LIBS; do
27 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
35 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
42 main(int argc, char **argv)
46 ],krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:,
47 krb_cv_sys_x_libs_rpath="" ; krb_cv_sys_x_libs="" ; break)
50 CFLAGS="$ac_save_cflags"
52 X_LIBS="$krb_cv_sys_x_libs"