configure.in
changeset 461 3340aee8ba50
parent 459 5fa02060a63f
child 504 3420d82f9b01
equal deleted inserted replaced
460:bcbf4788c477 461:3340aee8ba50
    65 dnl Debug mode?
    65 dnl Debug mode?
    66 dnl ---------------------------------------------------------------------
    66 dnl ---------------------------------------------------------------------
    67 
    67 
    68 AC_ARG_ENABLE(debug,
    68 AC_ARG_ENABLE(debug,
    69 [  --enable-debug             enable debug mode [default=yes]],
    69 [  --enable-debug             enable debug mode [default=yes]],
    70               , enable_debug=yes)
    70                 , enable_debug=no)
    71 if test x$enable_debug = xyes; then
    71 if test x$enable_debug = xyes; then
    72   if test x$ac_cv_prog_cc_g = xyes; then
    72   if test x$ac_cv_prog_cc_g = xyes; then
    73     PHYSFSCFLAGS="-g -O0"
    73     PHYSFSCFLAGS="-g -O0"
    74   else
    74   else
    75     PHYSFSCFLAGS="-O0"
    75     PHYSFSCFLAGS="-O0"
    82   AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
    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 Profile sorts, etc?
       
    88 dnl ---------------------------------------------------------------------
       
    89 
       
    90 AC_ARG_ENABLE(profiling,
       
    91 [  --enable-profiling         do algorithm profiling [default=no]],
       
    92                 , enable_profiling=no)
       
    93 if test x$enable_profiling = xyes; then
       
    94   AC_DEFINE([PHYSFS_PROFILING], 1, [define to profile sorting, etc algorithms])
       
    95 fi
       
    96 
       
    97 
       
    98 dnl ---------------------------------------------------------------------
    87 dnl Build test program?
    99 dnl Build test program?
    88 dnl ---------------------------------------------------------------------
   100 dnl ---------------------------------------------------------------------
    89 
   101 
    90 AC_ARG_ENABLE(testprog,
   102 AC_ARG_ENABLE(testprog,
    91 [  --enable-testprog          build test program [default=yes]],
   103 [  --enable-testprog          build test program [default=yes]],
    92               , enable_testprog=yes)
   104                 , enable_testprog=yes)
    93 
       
    94 
   105 
    95 dnl ---------------------------------------------------------------------
   106 dnl ---------------------------------------------------------------------
    96 dnl Checks for libraries.
   107 dnl Checks for libraries.
    97 dnl ---------------------------------------------------------------------
   108 dnl ---------------------------------------------------------------------
    98 
   109 
    99 require_zlib="no"
   110 require_zlib="no"
   100 
   111 
   101 dnl Check for zip archiver inclusion...
   112 dnl Check for zip archiver inclusion...
   102 AC_ARG_ENABLE(zip,
   113 AC_ARG_ENABLE(zip,
   103 [  --enable-zip               enable ZIP support [default=yes]],
   114 [  --enable-zip               enable ZIP support [default=yes]],
   104               , enable_zip=yes)
   115                 , enable_zip=yes)
   105 if test x$enable_zip = xyes; then
   116 if test x$enable_zip = xyes; then
   106   AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
   117   AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
   107   require_zlib="yes"
   118   require_zlib="yes"
   108 fi
   119 fi
   109 
   120 
   110 
   121 
   111 dnl Check for grp archiver inclusion...
   122 dnl Check for grp archiver inclusion...
   112 AC_ARG_ENABLE(grp,
   123 AC_ARG_ENABLE(grp,
   113 [  --enable-grp               enable Build Engine GRP support [default=yes]],
   124 [  --enable-grp               enable Build Engine GRP support [default=yes]],
   114               , enable_grp=yes)
   125                 , enable_grp=yes)
   115 if test x$enable_grp = xyes; then
   126 if test x$enable_grp = xyes; then
   116   AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
   127   AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
   117 fi
   128 fi
   118 
   129 
   119 
   130 
   120 dnl Check for qpak archiver inclusion...
   131 dnl Check for qpak archiver inclusion...
   121 AC_ARG_ENABLE(qpak,
   132 AC_ARG_ENABLE(qpak,
   122 [  --enable-qpak              enable Quake PAK support [default=yes]],
   133 [  --enable-qpak              enable Quake PAK support [default=yes]],
   123               , enable_qpak=yes)
   134                 , enable_qpak=yes)
   124 if test x$enable_qpak = xyes; then
   135 if test x$enable_qpak = xyes; then
   125   AC_DEFINE([PHYSFS_SUPPORTS_QPAK], 1, [define if qpak support is enabled])
   136   AC_DEFINE([PHYSFS_SUPPORTS_QPAK], 1, [define if qpak support is enabled])
   126 fi
   137 fi
   127 
   138 
   128 
   139 dnl Check if we should statically link the included zlib...
   129 AC_ARG_ENABLE(internal-zlib,
   140 AC_ARG_ENABLE(internal-zlib,
   130 [  --enable-internal-zlib     use included zlib [default=only if needed]],
   141 [  --enable-internal-zlib     use included zlib [default=only if needed]],
   131               , enable_internal_zlib=maybe)
   142               , enable_internal_zlib=maybe)
   132 
   143 
   133 dnl Check for zlib if needed.
   144 dnl Check for zlib if needed.
   180 
   191 
   181 
   192 
   182 dnl determine if we should include readline support...
   193 dnl determine if we should include readline support...
   183 AC_ARG_ENABLE(readline,
   194 AC_ARG_ENABLE(readline,
   184 [  --enable-readline          use GNU readline in test program [default=yes]],
   195 [  --enable-readline          use GNU readline in test program [default=yes]],
   185               , enable_readline=yes)
   196                 , enable_readline=yes)
       
   197 
   186 if test x$enable_readline = xyes; then
   198 if test x$enable_readline = xyes; then
   187   AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes)
   199   AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes)
   188   AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses)
   200   AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses)
   189   AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes)
   201   AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes)
   190   AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses)
   202   AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses)
   205 
   217 
   206 
   218 
   207 dnl determine if we should use the stubbed pthread code.
   219 dnl determine if we should use the stubbed pthread code.
   208 AC_ARG_ENABLE(pthreads,
   220 AC_ARG_ENABLE(pthreads,
   209 [  --enable-pthreads          include POSIX threads support [default=yes]],
   221 [  --enable-pthreads          include POSIX threads support [default=yes]],
   210               , enable_pthreads=yes)
   222                 , enable_pthreads=yes)
   211 if test x$enable_pthreads = xyes; then
   223 if test x$enable_pthreads = xyes; then
   212   AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes)
   224   AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes)
   213   if test x$have_pthread_hdr != xyes; then
   225   if test x$have_pthread_hdr != xyes; then
   214     enable_pthreads=no
   226     enable_pthreads=no
   215   fi
   227   fi
   216 fi
   228 fi
   217 
   229 
   218 dnl determine if we should use the stubbed CD-ROM detection code.
   230 dnl determine if we should use the stubbed CD-ROM detection code.
   219 AC_ARG_ENABLE(cdrom,
   231 AC_ARG_ENABLE(cdrom,
   220 [  --enable-cdrom             include CD-ROM support [default=yes]],
   232 [  --enable-cdrom             include CD-ROM support [default=yes]],
   221               , enable_cdrom=yes)
   233                 , enable_cdrom=yes)
       
   234 
   222 if test x$enable_cdrom = xyes; then
   235 if test x$enable_cdrom = xyes; then
   223   dnl reset this and let header detection reenable...
   236   dnl reset this and let header detection reenable...
   224   enable_cdrom=no
   237   enable_cdrom=no
   225 
   238 
   226   dnl BSD systems use sys/ucred.h for getting mounted volumes.
   239   dnl BSD systems use sys/ucred.h for getting mounted volumes.
   237     enable_cdrom=yes
   250     enable_cdrom=yes
   238   fi
   251   fi
   239 fi
   252 fi
   240 
   253 
   241 dnl determine language.
   254 dnl determine language.
   242 physfslang=english
       
   243 AC_ARG_ENABLE(language,
   255 AC_ARG_ENABLE(language,
   244 [  --enable-language=lang     Select natural language. [default=english]],
   256 [  --enable-language=lang     Select natural language. [default=english]],
   245               physfslang=`echo $enable_language |tr A-Z a-z`)
   257           physfslang=`echo $enable_language |tr A-Z a-z`, physfslang=english)
   246 
   258 
   247 AC_MSG_CHECKING([if language choice is supported])
   259 AC_MSG_CHECKING([if language choice is supported])
   248 physfs_valid_lang=no
   260 physfs_valid_lang=no
   249 
   261 
   250 if test x$physfslang = xenglish; then
   262 if test x$physfslang = xenglish; then