configure.in
changeset 331 822f78a88aba
parent 323 6da51f38cfd8
child 347 56ce50a62241
equal deleted inserted replaced
330:5ca5066cf5ff 331:822f78a88aba
    73     CFLAGS="-g -O0"
    73     CFLAGS="-g -O0"
    74   else
    74   else
    75     CFLAGS="-O0"
    75     CFLAGS="-O0"
    76   fi
    76   fi
    77   CFLAGS="$CFLAGS -Werror -Wall"
    77   CFLAGS="$CFLAGS -Werror -Wall"
    78   AC_DEFINE(DEBUG)
    78   AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
    79   AC_DEFINE(DEBUG_CHATTER)
    79   AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
    80 else
    80 else
    81   CFLAGS="-O2"
    81   CFLAGS="-O2"
    82   AC_DEFINE(NDEBUG)
    82   AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
    83 fi
    83 fi
    84 
    84 
    85 
    85 
    86 dnl ---------------------------------------------------------------------
    86 dnl ---------------------------------------------------------------------
    87 dnl Build test program?
    87 dnl Build test program?
    98 
    98 
    99 dnl !!! FIXME: Not sure how to detect this...
    99 dnl !!! FIXME: Not sure how to detect this...
   100 dnl check for 64-bit llseek()...
   100 dnl check for 64-bit llseek()...
   101 dnl AC_CHECK_LIB(c, llseek, have_llseek=yes)
   101 dnl AC_CHECK_LIB(c, llseek, have_llseek=yes)
   102 if test x$have_llseek = xyes; then
   102 if test x$have_llseek = xyes; then
   103   AC_DEFINE(PHYSFS_HAVE_LLSEEK)
   103   AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
   104 fi
   104 fi
   105 
   105 
   106 require_zlib="no"
   106 require_zlib="no"
   107 
   107 
   108 dnl Check for zip archiver inclusion...
   108 dnl Check for zip archiver inclusion...
   109 AC_ARG_ENABLE(zip,
   109 AC_ARG_ENABLE(zip,
   110 [  --enable-zip               enable ZIP support [default=yes]],
   110 [  --enable-zip               enable ZIP support [default=yes]],
   111               , enable_zip=yes)
   111               , enable_zip=yes)
   112 if test x$enable_zip = xyes; then
   112 if test x$enable_zip = xyes; then
   113   AC_DEFINE(PHYSFS_SUPPORTS_ZIP)
   113   AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
   114   require_zlib="yes"
   114   require_zlib="yes"
   115 fi
   115 fi
   116 
   116 
   117 
   117 
   118 dnl Check for zip archiver inclusion...
   118 dnl Check for zip archiver inclusion...
   119 AC_ARG_ENABLE(grp,
   119 AC_ARG_ENABLE(grp,
   120 [  --enable-grp               enable Build Engine GRP support [default=yes]],
   120 [  --enable-grp               enable Build Engine GRP support [default=yes]],
   121               , enable_grp=yes)
   121               , enable_grp=yes)
   122 if test x$enable_grp = xyes; then
   122 if test x$enable_grp = xyes; then
   123   AC_DEFINE(PHYSFS_SUPPORTS_GRP)
   123   AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
   124 fi
   124 fi
   125 
   125 
   126 
   126 
   127 AC_ARG_ENABLE(internal-zlib,
   127 AC_ARG_ENABLE(internal-zlib,
   128 [  --enable-internal-zlib     use included zlib [default=only if needed]],
   128 [  --enable-internal-zlib     use included zlib [default=only if needed]],
   186   AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses)
   186   AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses)
   187   AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes)
   187   AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes)
   188   AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses)
   188   AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses)
   189   if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then
   189   if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then
   190     if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then
   190     if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then
   191       AC_DEFINE(PHYSFS_HAVE_READLINE)
   191       AC_DEFINE([PHYSFS_HAVE_READLINE], 1, [define if we have readline])
   192       LIBS="$LIBS -lreadline -lcurses"
   192       LIBS="$LIBS -lreadline -lcurses"
   193     fi
   193     fi
   194   fi
   194   fi
   195 fi
   195 fi
   196 
   196