configure.in
changeset 593 6aba84679d82
parent 588 9f398d3d84a3
child 602 691c1eadb8b7
equal deleted inserted replaced
592:463c82b145d0 593:6aba84679d82
    37 AC_SUBST(LT_CURRENT)
    37 AC_SUBST(LT_CURRENT)
    38 AC_SUBST(LT_REVISION)
    38 AC_SUBST(LT_REVISION)
    39 AC_SUBST(LT_AGE)
    39 AC_SUBST(LT_AGE)
    40 
    40 
    41 dnl Detect the canonical host and target build environment
    41 dnl Detect the canonical host and target build environment
    42 AC_CANONICAL_BUILD
    42 AC_CANONICAL_SYSTEM
    43 AC_CANONICAL_HOST
       
    44 AC_CANONICAL_TARGET
       
    45 
    43 
    46 dnl Setup for automake
    44 dnl Setup for automake
    47 AM_CONFIG_HEADER(config.h)
    45 AM_CONFIG_HEADER(config.h)
    48 AM_INIT_AUTOMAKE(physfs, $VERSION)
    46 AM_INIT_AUTOMAKE(physfs, $VERSION)
    49 
    47 
   338 fi
   336 fi
   339 
   337 
   340 have_non_posix_threads=no
   338 have_non_posix_threads=no
   341 
   339 
   342 AC_MSG_CHECKING([if this is BeOS])
   340 AC_MSG_CHECKING([if this is BeOS])
   343 if test x$build_os = xbeos; then
   341 if test x$target_os = xbeos; then
   344   this_is_beos=yes
   342   this_is_beos=yes
   345   enable_pthreads=no
   343   enable_pthreads=no
   346   have_non_posix_threads=yes
   344   have_non_posix_threads=yes
   347   LIBS="$LIBS -lroot -lbe"
   345   LIBS="$LIBS -lroot -lbe"
   348 else
   346 else
   350 fi
   348 fi
   351 
   349 
   352 AC_MSG_RESULT([$this_is_beos])
   350 AC_MSG_RESULT([$this_is_beos])
   353 
   351 
   354 AC_MSG_CHECKING([if this is Cygwin])
   352 AC_MSG_CHECKING([if this is Cygwin])
   355 if test x$build_os = xcygwin; then
   353 if test x$target_os = xcygwin; then
   356   this_is_cygwin=yes
   354   this_is_cygwin=yes
   357   PHYSFSCFLAGS="$PHYSFSCFLAGS -DWIN32"
   355   PHYSFSCFLAGS="$PHYSFSCFLAGS -DWIN32"
   358   enable_pthreads=no
   356   enable_pthreads=no
   359   have_non_posix_threads=yes
   357   have_non_posix_threads=yes
   360 else
   358 else
   364 AC_MSG_RESULT([$this_is_cygwin])
   362 AC_MSG_RESULT([$this_is_cygwin])
   365 
   363 
   366 this_is_macosx=no
   364 this_is_macosx=no
   367 if test x$we_have_sed = xyes; then
   365 if test x$we_have_sed = xyes; then
   368   AC_MSG_CHECKING([if this is MacOS X])
   366   AC_MSG_CHECKING([if this is MacOS X])
   369   x=`echo $build_os |sed "s/darwin.*/darwin/"`
   367   x=`echo $target_os |sed "s/darwin.*/darwin/"`
   370   if test x$x = xdarwin -a x$build_vendor = xapple; then
   368   if test x$x = xdarwin -a x$target_vendor = xapple; then
   371     this_is_macosx=yes
   369     this_is_macosx=yes
   372     PHYSFSLDFLAGS="$PHYSFSLDFLAGS -Wl,-framework -Wl,Carbon -Wl,-framework -Wl,IOKit"
   370     PHYSFSLDFLAGS="$PHYSFSLDFLAGS -Wl,-framework -Wl,Carbon -Wl,-framework -Wl,IOKit"
   373   fi
   371   fi
   374 
   372 
   375   AC_MSG_RESULT([$this_is_macosx])
   373   AC_MSG_RESULT([$this_is_macosx])
   376 fi
   374 fi
   377 
   375 
   378 this_is_freebsd=no
   376 this_is_freebsd=no
   379 if test x$we_have_sed = xyes; then
   377 if test x$we_have_sed = xyes; then
   380   AC_MSG_CHECKING([if this is FreeBSD])
   378   AC_MSG_CHECKING([if this is FreeBSD])
   381   x=`echo $build_os |tr A-Z a-z |sed "s/.*freebsd.*/freebsd/"`
   379   x=`echo $target_os |tr A-Z a-z |sed "s/.*freebsd.*/freebsd/"`
   382   if test x$x = xfreebsd; then
   380   if test x$x = xfreebsd; then
   383     this_is_freebsd=yes
   381     this_is_freebsd=yes
   384     PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
   382     PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
   385   fi
   383   fi
   386 
   384 
   388 fi
   386 fi
   389 
   387 
   390 this_is_openbsd=no
   388 this_is_openbsd=no
   391 if test x$we_have_sed = xyes; then
   389 if test x$we_have_sed = xyes; then
   392   AC_MSG_CHECKING([if this is OpenBSD])
   390   AC_MSG_CHECKING([if this is OpenBSD])
   393   x=`echo $build_os |tr A-Z a-z |sed "s/.*openbsd.*/openbsd/"`
   391   x=`echo $target_os |tr A-Z a-z |sed "s/.*openbsd.*/openbsd/"`
   394   if test x$x = xopenbsd; then
   392   if test x$x = xopenbsd; then
   395     this_is_openbsd=yes
   393     this_is_openbsd=yes
   396     PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
   394     PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
   397   fi
   395   fi
   398 
   396 
   400 fi
   398 fi
   401 
   399 
   402 this_is_atheos=no
   400 this_is_atheos=no
   403 if test x$we_have_sed = xyes; then
   401 if test x$we_have_sed = xyes; then
   404   AC_MSG_CHECKING([if this is AtheOS])
   402   AC_MSG_CHECKING([if this is AtheOS])
   405   x=`echo $build_os |tr A-Z a-z |sed "s/.*atheos.*/atheos/"`
   403   x=`echo $target_os |tr A-Z a-z |sed "s/.*atheos.*/atheos/"`
   406   if test x$x = xatheos; then
   404   if test x$x = xatheos; then
   407     this_is_atheos=yes
   405     this_is_atheos=yes
   408     enable_cdrom=no
   406     enable_cdrom=no
   409     enable_pthreads=no
   407     enable_pthreads=no
   410   fi
   408   fi
   413 fi
   411 fi
   414 
   412 
   415 this_is_os2=no
   413 this_is_os2=no
   416 if test x$we_have_sed = xyes; then
   414 if test x$we_have_sed = xyes; then
   417   AC_MSG_CHECKING([if this is OS/2])
   415   AC_MSG_CHECKING([if this is OS/2])
   418   x=`echo $build_os |tr A-Z a-z |sed "s/.*os2.*/os2/"`
   416   x=`echo $target_os |tr A-Z a-z |sed "s/.*os2.*/os2/"`
   419   if test x$x = xos2; then
   417   if test x$x = xos2; then
   420     this_is_os2=yes
   418     this_is_os2=yes
   421     PHYSFSCFLAGS="$PHYSFSCFLAGS -DOS2"
   419     PHYSFSCFLAGS="$PHYSFSCFLAGS -DOS2"
   422   fi
   420   fi
   423 
   421 
   424   AC_MSG_RESULT([$this_is_os2])
   422   AC_MSG_RESULT([$this_is_os2])
   425 fi
   423 fi
   426 
   424 
       
   425 this_is_mint=no
       
   426 if test x$we_have_sed = xyes; then
       
   427   AC_MSG_CHECKING([if this is MiNT])
       
   428   x=`echo $target_os |tr A-Z a-z |sed "s/.*mint.*/mint/"`
       
   429   if test x$x = xmint; then
       
   430     this_is_mint=yes
       
   431     enable_cdrom=no
       
   432     enable_pthreads=no
       
   433   fi
       
   434 
       
   435   AC_MSG_RESULT([$this_is_mint])
       
   436 fi
   427 
   437 
   428 
   438 
   429 dnl Some platform might disable this, so check this down here...
   439 dnl Some platform might disable this, so check this down here...
   430 if test x$enable_cdrom != xyes; then
   440 if test x$enable_cdrom != xyes; then
   431   AC_DEFINE([PHYSFS_NO_CDROM_SUPPORT], 1, [define if we have no CD support])
   441   AC_DEFINE([PHYSFS_NO_CDROM_SUPPORT], 1, [define if we have no CD support])