configure.in
changeset 347 56ce50a62241
parent 331 822f78a88aba
child 351 bc4fa7896225
equal deleted inserted replaced
346:504cd139c52a 347:56ce50a62241
   224   fi
   224   fi
   225 
   225 
   226   AC_MSG_RESULT([$this_is_macosx])
   226   AC_MSG_RESULT([$this_is_macosx])
   227 fi
   227 fi
   228 
   228 
       
   229 this_is_freebsd=no
       
   230 if test x$we_have_sed = xyes; then
       
   231   AC_MSG_CHECKING([if this is FreeBSD])
       
   232   x=`echo $build_os |tr A-Z a-z |sed "s/.*freebsd.*/freebsd/"`
       
   233   if test x$x = xfreebsd; then
       
   234     this_is_freebsd=yes
       
   235   fi
       
   236 
       
   237   AC_MSG_RESULT([$this_is_freebsd])
       
   238 fi
       
   239 
   229 # Checks for header files.
   240 # Checks for header files.
   230 AC_HEADER_STDC
   241 AC_HEADER_STDC
   231 AC_CHECK_HEADERS([stdlib.h string.h])
   242 AC_CHECK_HEADERS([stdlib.h string.h])
   232 
   243 
   233 # Checks for typedefs, structures, and compiler characteristics.
   244 # Checks for typedefs, structures, and compiler characteristics.
   239 # This is only in the bleeding edge autoconf distro...
   250 # This is only in the bleeding edge autoconf distro...
   240 #AC_FUNC_MALLOC
   251 #AC_FUNC_MALLOC
   241 
   252 
   242 AC_FUNC_MEMCMP
   253 AC_FUNC_MEMCMP
   243 AC_CHECK_FUNCS([memset strrchr])
   254 AC_CHECK_FUNCS([memset strrchr])
       
   255 
       
   256 CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"
       
   257 LDFLAGS="$LDFLAGS -no-undefined"
       
   258 
       
   259 if test x$this_is_freebsd = x$yes; then
       
   260   LDFLAGS="$LDFLAGS -pthread"
       
   261 fi
   244 
   262 
   245 dnl Add Makefile conditionals
   263 dnl Add Makefile conditionals
   246 AM_CONDITIONAL(BUILD_ZLIB, test x$enable_internal_zlib = xyes)
   264 AM_CONDITIONAL(BUILD_ZLIB, test x$enable_internal_zlib = xyes)
   247 AM_CONDITIONAL(BUILD_TEST_PHYSFS, test x$enable_testprog = xyes)
   265 AM_CONDITIONAL(BUILD_TEST_PHYSFS, test x$enable_testprog = xyes)
   248 AM_CONDITIONAL(BUILD_MACOSX, test x$this_is_macosx = xyes)
   266 AM_CONDITIONAL(BUILD_MACOSX, test x$this_is_macosx = xyes)
   249 AM_CONDITIONAL(BUILD_BEOS, test x$this_is_beos = xyes)
   267 AM_CONDITIONAL(BUILD_BEOS, test x$this_is_beos = xyes)
   250 AM_CONDITIONAL(BUILD_CYGWIN, test x$this_is_cygwin = xyes)
   268 AM_CONDITIONAL(BUILD_CYGWIN, test x$this_is_cygwin = xyes)
   251 
       
   252 LDFLAGS="$LDFLAGS -no-undefined"
       
   253 
   269 
   254 AC_OUTPUT([
   270 AC_OUTPUT([
   255 Makefile
   271 Makefile
   256 archivers/Makefile
   272 archivers/Makefile
   257 platform/Makefile
   273 platform/Makefile