ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/ac-tools/OOPSE.m4
(Generate patch)

Comparing trunk/OOPSE-3.0/ac-tools/OOPSE.m4 (file contents):
Revision 2753 by gezelter, Tue May 16 20:38:23 2006 UTC vs.
Revision 2754 by gezelter, Wed May 17 03:03:03 2006 UTC

# Line 1050 | Line 1050 | AC_DEFUN([ACX_CHECK_ZLIB],
1050   #
1051   # Handle user hints
1052   #
1053 < [AC_MSG_CHECKING(if zlib is wanted)
1054 < AC_ARG_WITH(zlib,
1055 < [  --with-zlib=DIR root directory path of zlib installation [defaults to
1056 <                    /usr/local or /usr if not found in /usr/local]
1057 <  --without-zlib to disable zlib usage completely],
1058 < [if test "$withval" != no ; then
1059 <  AC_MSG_RESULT(yes)
1060 <  if test -d "$withval"
1061 <  then
1062 <    ZLIB_HOME="$withval"
1063 <  else
1064 <    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
1053 > [AC_ARG_WITH(zlib,
1054 >                AC_HELP_STRING([--with-zlib=DIR],
1055 >           [root directory path of zlib installation (defaults to /usr/local or /usr if not found in /usr/local)]dnl
1056 >                           ),
1057 >                [zlib_dir="$withval"]dnl
1058 >                            ,dnl
1059 >                [zlib_dir="not_set"]dnl
1060 >    )dnl
1061 >
1062 > if test "$zlib_dir" != "no"; then
1063 >
1064 > if test "$zlib_dir" != "not_set" ; then
1065 >  if test -d "$zlib_dir"
1066 >  then
1067 >    ZLIB_HOME="$zlib_dir"
1068 >  else
1069 >    AC_MSG_WARN([Sorry, $zlib_dir does not exist, checking usual places])
1070    fi
1071 < else
1067 <  AC_MSG_RESULT(no)
1068 < fi])
1071 > fi
1072  
1073   ZLIB_HOME=/usr/local
1074   if test ! -f "${ZLIB_HOME}/include/zlib.h"
# Line 1087 | Line 1090 | then
1090          AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
1091          AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
1092          AC_LANG_RESTORE
1093 <        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
1094 <        then
1095 <                #
1096 <                # If both library and header were found, use them
1097 <                #
1098 <                AC_CHECK_LIB(z, inflateEnd)
1099 <                AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
1097 <                AC_MSG_RESULT(ok)
1093 >
1094 >        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"; then
1095 >                AC_DEFINE(HAVE_ZLIB_H, 1, [have zlib.h])
1096 >                AC_DEFINE(HAVE_LIBZ, 1, [have libz.a])
1097 >                ZLIB_INC_DIR="${ZLIB_HOME}/include"
1098 >                ZLIB_LIB_DIR="${ZLIB_HOME}/lib"
1099 >                ZLIB="-lz"
1100          else
1099                #
1100                # If either header or library was not found, revert and bomb
1101                #
1101                  AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
1102 +                ZLIB_INC_DIR=
1103 +                ZLIB_LIB_DIR=
1104 +                ZLIB=
1105                  LDFLAGS="$ZLIB_OLD_LDFLAGS"
1106                  CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
1107                  AC_MSG_RESULT(failed)
1108 <                AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib)
1108 >                echo ""
1109 >                echo "*********************************************************"
1110 >                echo "* WARNING: Could not find a working zlib installation   *"
1111 >                echo "* If you need OOPSE to be able to deal with compressed  *"
1112 >                echo "* trajectory dump files be sure to specify a valid zlib *"
1113 >                echo "* installation with --with-zlib=DIR                     *"
1114 >                echo "*                                                       *"
1115 >                echo "* OOPSE will still work without zlib installed.         *"
1116 >                echo "*********************************************************"
1117 >                echo ""
1118          fi
1119 +        AC_SUBST(ZLIB_INC_DIR)
1120 +        AC_SUBST(ZLIB_LIB_DIR)
1121 +        AC_SUBST(ZLIB)
1122   fi
1123 <
1123 > fi
1124   ])
1125  
1126 +
1127   AC_DEFUN([ACX_CHECK_FFTW],
1128   #
1129   # Handle user hints

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines