configure.in
changeset 390 6649d6caecf2
parent 389 b35668cd8b3e
child 427 c38ace41039f
equal deleted inserted replaced
389:b35668cd8b3e 390:6649d6caecf2
   193 if test x$have_llseek = xyes; then
   193 if test x$have_llseek = xyes; then
   194   AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
   194   AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
   195 fi
   195 fi
   196 
   196 
   197 
   197 
       
   198 dnl determine if we should use the stubbed pthread code.
       
   199 AC_ARG_ENABLE(pthreads,
       
   200 [  --enable-pthreads          include POSIX threads support [default=yes]],
       
   201               , enable_pthreads=yes)
       
   202 if test x$enable_pthreads = xyes; then
       
   203   AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes)
       
   204   if test x$have_pthread_hdr != xyes; then
       
   205     enable_pthreads=no
       
   206   fi
       
   207 fi
       
   208 
   198 dnl determine if we should use the stubbed CD-ROM detection code.
   209 dnl determine if we should use the stubbed CD-ROM detection code.
   199 AC_ARG_ENABLE(cdrom,
   210 AC_ARG_ENABLE(cdrom,
   200 [  --enable-cdrom             include CD-ROM support [default=yes]],
   211 [  --enable-cdrom             include CD-ROM support [default=yes]],
   201               , enable_cdrom=yes)
   212               , enable_cdrom=yes)
   202 if test x$enable_cdrom = xyes; then
   213 if test x$enable_cdrom = xyes; then
   216     AC_DEFINE([PHYSFS_HAVE_MNTENT_H], 1, [define if we have mntent.h])
   227     AC_DEFINE([PHYSFS_HAVE_MNTENT_H], 1, [define if we have mntent.h])
   217     enable_cdrom=yes
   228     enable_cdrom=yes
   218   fi
   229   fi
   219 fi
   230 fi
   220 
   231 
       
   232 have_non_posix_threads=no
       
   233 
   221 dnl AC_CHECK_HEADER(be/kernel/OS.h, this_is_beos=yes)
   234 dnl AC_CHECK_HEADER(be/kernel/OS.h, this_is_beos=yes)
   222 AC_MSG_CHECKING([if this is BeOS])
   235 AC_MSG_CHECKING([if this is BeOS])
   223 if test x$build_os = xbeos; then
   236 if test x$build_os = xbeos; then
   224   this_is_beos=yes
   237   this_is_beos=yes
       
   238   enable_pthreads=no
       
   239   have_non_posix_threads=yes
   225   LIBS="$LIBS -lroot -lbe"
   240   LIBS="$LIBS -lroot -lbe"
   226 else
   241 else
   227   this_is_beos=no
   242   this_is_beos=no
   228 fi
   243 fi
   229 
   244 
   231 
   246 
   232 AC_MSG_CHECKING([if this is Cygwin])
   247 AC_MSG_CHECKING([if this is Cygwin])
   233 if test x$build_os = xcygwin; then
   248 if test x$build_os = xcygwin; then
   234   this_is_cygwin=yes
   249   this_is_cygwin=yes
   235   CFLAGS="$CFLAGS -DWIN32"
   250   CFLAGS="$CFLAGS -DWIN32"
       
   251   enable_pthreads=no
       
   252   have_non_posix_threads=yes
   236 else
   253 else
   237   this_is_cygwin=no
   254   this_is_cygwin=no
   238 fi
   255 fi
   239 
   256 
   240 AC_MSG_RESULT([$this_is_cygwin])
   257 AC_MSG_RESULT([$this_is_cygwin])
   279   AC_MSG_CHECKING([if this is AtheOS])
   296   AC_MSG_CHECKING([if this is AtheOS])
   280   x=`echo $build_os |tr A-Z a-z |sed "s/.*atheos.*/atheos/"`
   297   x=`echo $build_os |tr A-Z a-z |sed "s/.*atheos.*/atheos/"`
   281   if test x$x = xatheos; then
   298   if test x$x = xatheos; then
   282     this_is_atheos=yes
   299     this_is_atheos=yes
   283     enable_cdrom=no
   300     enable_cdrom=no
   284     LDFLAGS="$LDFLAGS -lpthread"
   301     enable_pthreads=no
   285   fi
   302   fi
   286 
   303 
   287   AC_MSG_RESULT([$this_is_atheos])
   304   AC_MSG_RESULT([$this_is_atheos])
   288 fi
   305 fi
   289 
   306 
   290 dnl Some platform might disable this, so check this down here...
   307 dnl Some platform might disable this, so check this down here...
   291 if test x$enable_cdrom != xyes; then
   308 if test x$enable_cdrom != xyes; then
   292   AC_DEFINE([PHYSFS_NO_CDROM_SUPPORT], 1, [define if we have no CD support])
   309   AC_DEFINE([PHYSFS_NO_CDROM_SUPPORT], 1, [define if we have no CD support])
   293   AC_MSG_WARN([***])
   310   AC_MSG_WARN([***])
   294   AC_MSG_WARN([*** There is no CD-ROM support in this build!])
   311   AC_MSG_WARN([*** There is no CD-ROM support in this build!])
   295   AC_MSG_WARN([*** PhysicsFS will just pretend there are no discs!])
   312   AC_MSG_WARN([*** PhysicsFS will just pretend there are no discs.])
   296   AC_MSG_WARN([*** Is this what you really wanted?])
   313   AC_MSG_WARN([*** This may be fine, depending on how PhysicsFS is used,])
       
   314   AC_MSG_WARN([***   but is this what you REALLY wanted?])
       
   315   AC_MSG_WARN([*** (Maybe fix configure.in, or write a platform driver?)])
   297   AC_MSG_WARN([***])
   316   AC_MSG_WARN([***])
       
   317 fi
       
   318 
       
   319 if test x$enable_pthreads != xyes; then
       
   320   AC_DEFINE([PHYSFS_NO_PTHREADS_SUPPORT], 1, [define if we have no POSIX threads support])
       
   321   if test x$have_non_posix_threads != xyes; then
       
   322     AC_MSG_WARN([***])
       
   323     AC_MSG_WARN([*** There is no thread support in this build!])
       
   324     AC_MSG_WARN([*** PhysicsFS will NOT be reentrant!])
       
   325     AC_MSG_WARN([*** This may be fine, depending on how PhysicsFS is used,])
       
   326     AC_MSG_WARN([***   but is this what you REALLY wanted?])
       
   327     AC_MSG_WARN([*** (Maybe fix configure.in, or write a platform driver?)])
       
   328     AC_MSG_WARN([***])
       
   329   fi
   298 fi
   330 fi
   299 
   331 
   300 
   332 
   301 # Checks for header files.
   333 # Checks for header files.
   302 AC_HEADER_STDC
   334 AC_HEADER_STDC