--- acinclude.m4.orig Thu Nov 19 19:12:57 1998 +++ acinclude.m4 Thu Nov 19 19:14:26 1998 @@ -4,10 +4,10 @@ dnl dnl This macro is intended to search for X11-related libraries. It takes the dnl following variables for input: -dnl LIBS -- prefixed to all linker lines -dnl X_LIBS -- prefixed to all linker lines (after LIBS) +dnl X_LIBS -- prefixed to all linker lines dnl X_EXTRA_LIBS -- suffixed to all linker lines -dnl Thus, the trial linker line will be "$LIBS $X_LIBS -l$1 $X_EXTRA_LIBS". +dnl LIBS -- suffixed to all linker lines (after X_EXTRA_LIBS) +dnl Thus, the trial linker line will be "$X_LIBS -l$1 $X_EXTRA_LIBS $LIBS". dnl dnl The following variables are output: dnl X_EXTRA_LIBS -- contains "-l$1 $X_EXTRA_LIBS" if the link succeeds @@ -19,7 +19,7 @@ dnl FC_CHECK_X_LIB(X11, XOpenDisplay, , AC_MSG_ERROR("Need X11")) dnl FC_CHECK_X_LIB(Xext, XShapeCombineMask) dnl [etc.] -dnl LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS" +dnl LIBS="$X_LIBS $X_EXTRA_LIBS $LIBS" dnl AC_DEFUN(FC_CHECK_X_LIB, [AC_MSG_CHECKING([for $2 in X library -l$1]) @@ -30,7 +30,7 @@ ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, [ac_save_LIBS="$LIBS" -LIBS="$LIBS $X_LIBS -l$1 $X_EXTRA_LIBS" +LIBS="$X_LIBS -l$1 $X_EXTRA_LIBS $LIBS" AC_TRY_LINK(dnl ifelse([$2], [main], , dnl Avoid conflicting decl of main. [/* Override any gcc2 internal prototype to avoid an error. */ @@ -79,4 +79,4 @@ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""[$]$1"\" )` -]) \ No newline at end of file +])