$NetBSD: patch-ad,v 1.5 2002/04/17 04:45:14 fredb Exp $ --- config/configure.in.orig Wed Nov 8 14:14:50 2000 +++ config/configure.in @@ -62,7 +62,7 @@ fi]) AC_PATH_XTRA -LIBS="$extra_libraries -L/usr/local/lib $X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lm" +LIBS="$extra_libraries -L${X11BASE}/lib -Wl,-R${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib $X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS -lm" CPPFLAGS="$extra_includes $CPPFLAGS $X_CFLAGS" ### Check for the pt library (for SCO, needed for X) @@ -83,7 +83,7 @@ case "`gcc -v 2>&1`" in *"2.95"*) AC_LANG_CPLUSPLUS AC_CACHE_CHECK(for X headers compilance with ANSI C++, - xfmail_cv_permiss, [AC_TRY_COMPILE([#include ], + xfmail_cv_permiss, [AC_TRY_COMPILE([#include ], [int x; x=0], xfmail_cv_permiss=yes, xfmail_cv_permiss=no)]) if test x$xfmail_cv_permiss = xno; then CPPFLAGS="-fpermissive $CPPFLAGS" @@ -95,8 +95,12 @@ AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage,LIBS="-lXpm $LIBS", [XFMAIL_LIB_ERROR(libXpm,libXpm)]) +dnl Check for jpeg library +AC_CHECK_LIB(jpeg, jpeg_set_defaults,LIBS="-ljpeg $LIBS", + [XFMAIL_LIB_ERROR(libjpeg,libjpeg)]) + dnl Check for libforms or libxforms -AC_CHECK_LIB(forms, fl_initialize, LIBS="-lforms $LIBS", +AC_CHECK_LIB(forms, fl_initialize, LIBS="-lforms -ljpeg -lXpm $LIBS", [AC_CHECK_LIB(xforms, fl_initialize, LIBS="-lxforms $LIBS", [XFMAIL_LIB_ERROR(libforms nor libxforms,libforms)])]) @@ -217,14 +221,14 @@ AC_CHECK_HEADER(X11/xpm.h,[],XFMAIL_LIB_ERROR(X11/xpm.h,libXpm)) dnl Check for xforms headers -AC_CHECK_HEADER(forms.h,[],XFMAIL_LIB_ERROR(forms.h,libforms)) -if test $ac_cv_header_forms_h = yes; then +AC_CHECK_HEADER(X11/forms.h,[],XFMAIL_LIB_ERROR(X11/forms.h,libforms)) +if test $ac_cv_header_X11_forms_h = yes; then AC_CACHE_CHECK([xforms library version],xfmail_cv_xfversion, [ cat > conftest.$ac_ext < +#include #if ! defined(FL_INCLUDE_VERSION) %%%old!%%% #else