diff options
author | markm <markm@FreeBSD.org> | 2000-01-09 20:58:00 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-01-09 20:58:00 +0000 |
commit | 5f68254a360fdb4f3ebc30f6ad6507556425dd0a (patch) | |
tree | a96b9cd24173c10bba3fd7e2acf5d68e5bb0773e /crypto/heimdal/cf/check-x.m4 | |
parent | d88c9767e1793993cc2242ccfb9a8ba002a061c6 (diff) | |
parent | 4ecbd6db44d79348bc815f31096e53104f50838b (diff) | |
download | FreeBSD-src-5f68254a360fdb4f3ebc30f6ad6507556425dd0a.zip FreeBSD-src-5f68254a360fdb4f3ebc30f6ad6507556425dd0a.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r55682,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/heimdal/cf/check-x.m4')
-rw-r--r-- | crypto/heimdal/cf/check-x.m4 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/crypto/heimdal/cf/check-x.m4 b/crypto/heimdal/cf/check-x.m4 new file mode 100644 index 0000000..1791e5a --- /dev/null +++ b/crypto/heimdal/cf/check-x.m4 @@ -0,0 +1,52 @@ +dnl +dnl See if there is any X11 present +dnl +dnl $Id: check-x.m4,v 1.2 1999/11/05 04:25:23 assar Exp $ + +AC_DEFUN(KRB_CHECK_X,[ +AC_PATH_XTRA + +# try to figure out if we need any additional ld flags, like -R +# and yes, the autoconf X test is utterly broken +if test "$no_x" != yes; then + AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[ + ac_save_libs="$LIBS" + ac_save_cflags="$CFLAGS" + CFLAGS="$CFLAGS $X_CFLAGS" + krb_cv_sys_x_libs_rpath="" + krb_cv_sys_x_libs="" + for rflag in "" "-R" "-R " "-rpath "; do + if test "$rflag" = ""; then + foo="$X_LIBS" + else + foo="" + for flag in $X_LIBS; do + case $flag in + -L*) + foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`" + ;; + *) + foo="$foo $flag" + ;; + esac + done + fi + LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + AC_TRY_RUN([ + #include <X11/Xlib.h> + foo() + { + XOpenDisplay(NULL); + } + main() + { + return 0; + } + ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:) + done + LIBS="$ac_save_libs" + CFLAGS="$ac_save_cflags" + ]) + X_LIBS="$krb_cv_sys_x_libs" +fi +]) |