--- configure.ac.orig 2007-10-19 08:22:39.000000000 +0200 +++ configure.ac @@ -74,6 +74,18 @@ need_pragma=yes ; ;; + bsdsunix* ) OSTYPE=FreeBSD ; + OS_TAG="P_FREEBSD" ; + OSRELEASE=900300 + need_pragma=yes ; + ;; + + dragonfly* ) OSTYPE=FreeBSD ; + OS_TAG="P_FREEBSD" ; + OSRELEASE=900100 + need_pragma=yes ; + ;; + freebsd* ) OSTYPE=FreeBSD ; OS_TAG="P_FREEBSD" ; if test "x$OSRELEASE" = "x"; then @@ -145,7 +157,7 @@ x86 | i686 | i586 | i486 | i386 ) MACHTYPE=x86 ;; - x86_64) MACHTYPE=x86_64 ; + x86_64|amd64) MACHTYPE=x86_64 ; P_64BIT=1 ; LIB64=1 ; ;; @@ -162,7 +174,9 @@ LIB64=1 ; ;; - sparc ) MACHTYPE=sparc ; + sparc|sparc64 ) MACHTYPE=sparc ; + P_64BIT=1 ; + LIB64=1 ; ;; powerpc ) MACHTYPE=ppc ; @@ -348,7 +362,7 @@ # $CXX $CFLAGS -Woverloaded-virtual conftest.cc > /dev/null 2>&1 # if test $? = 0 ; then # AC_MSG_RESULT(yes) -# STDCCFLAGS="$STDCCFLAGS -Woverloaded-virtual" +# STDCXXFLAGS="$STDCCFLAGS -Woverloaded-virtual" # else # AC_MSG_RESULT(no) # fi @@ -377,7 +391,7 @@ AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - STDCXXFLAGS="$STDCCFLAGS -rtti" + STDCXXFLAGS="$STDCXXFLAGS -rtti" fi GCSECTIONS=0 @@ -398,7 +412,7 @@ $CXX $CFLAGS -ffunction-sections -c conftest.cc > /dev/null 2>&1 if test $? = 0 ; then AC_MSG_RESULT(yes) - STDCCFLAGS="$STDCCFLAGS -ffunction-sections" + STDCXXFLAGS="$STDCXXFLAGS -ffunction-sections" GCSECTIONS=1 else AC_MSG_RESULT(no) @@ -414,7 +428,7 @@ dnl $CXX $CFLAGS -fdata-sections -c conftest.cc > /dev/null 2>&1 dnl if test $? = 0 ; then dnl AC_MSG_RESULT(yes) - dnl STDCCFLAGS="$STDCCFLAGS -fdata-sections" + dnl STDCXXFLAGS="$STDCXXFLAGS -fdata-sections" dnl GCSECTIONS=1 dnl else dnl AC_MSG_RESULT(no) @@ -427,7 +441,7 @@ dnl $CXX $CFLAGS -fvtable-gc -c conftest.cc > /dev/null 2>&1 dnl if test $? = 0 ; then dnl AC_MSG_RESULT(yes) - dnl STDCCFLAGS="$STDCCFLAGS -fvtable-gc" + dnl STDCXXFLAGS="$STDCXXFLAGS -fvtable-gc" dnl GCSECTIONS=1 dnl else dnl AC_MSG_RESULT(no) @@ -662,7 +676,7 @@ P_HAS_ATOMIC_INT=0 P_NEEDS_GNU_CXX_NAMESPACE=0 AC_MSG_CHECKING(if atomic integer available) -AC_TRY_COMPILE([#include ], +AC_TRY_COMPILE([#include ${ATOMICITY_H}], [_Atomic_word val;], P_HAS_ATOMIC_INT=1, AC_TRY_COMPILE([#include ], [_Atomic_word val;], P_HAS_ATOMIC_INT=2) @@ -671,7 +685,7 @@ AC_MSG_RESULT(yes) AC_MSG_CHECKING(if __exchange_and_add is in __gnu_cxx namespace) if test ${P_HAS_ATOMIC_INT} = 1 ; then - AC_TRY_COMPILE([#include ], + AC_TRY_COMPILE([#include ${ATOMICITY_H}], [_Atomic_word val; __gnu_cxx::__exchange_and_add(&val, 1)], P_NEEDS_GNU_CXX_NAMESPACE=1) else @@ -721,7 +735,7 @@ AC_MSG_CHECKING(for upad128_t) AC_TRY_COMPILE([#include ], [upad128_t upad; upad._q = 0.0;], has_upad128_t=y) - if test ${has_upad128_t} == "y"; then + if test ${has_upad128_t} = "y"; then AC_MSG_RESULT(yes) AC_DEFINE(P_HAS_UPAD128_T) else @@ -746,7 +760,7 @@ fi fi -if test "${P_HAS_SEMAPHORES}x" == "x" ; then +if test "${P_HAS_SEMAPHORES}x" = "x" ; then AC_TRY_COMPILE([#include ], [sem_t *s = sem_open("test", O_CREAT)], @@ -928,7 +942,7 @@ AC_SUBST(HAS_PLUGINS) if test "x$LIB64" != "x" ; then - AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], ["${INSTALLPREFIX}/lib64/pwlib"], [Default plugin directory]) + AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], ["${INSTALLPREFIX}/lib/pwlib"], [Default plugin directory]) else AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], ["${INSTALLPREFIX}/lib/pwlib"], [Default plugin directory]) fi @@ -1660,7 +1674,7 @@ dnl Linux check AC_CHECK_HEADERS(SDL/SDL.h, HAS_SDL=1) if test "${HAS_SDL:-unset}" != "unset" ; then - if test "${X11LIBDIR:-unset}" == "unset" ; then + if test "${X11LIBDIR:-unset}" = "unset" ; then X11LIBDIR=/usr/X11R6/lib fi AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, HAS_SDL=1, HAS_SDL=, -L${X11LIBDIR} -lpthread -lX11 -lXext) @@ -1718,9 +1732,10 @@ HAS_VIDEO_CAPTURE=1 else AC_CHECK_HEADER(linux/videodev.h, HAS_VIDEO_CAPTURE=1) - dnl AC_CHECK_HEADER(machine/ioctl_meteor.h, HAS_VIDEO_CAPTURE=1) - dnl AC_CHECK_HEADER(i386/ioctl_meteor.h, HAS_VIDEO_CAPTURE=1) - dnl AC_CHECK_HEADER(dev/ic/bt8xx.h, HAS_VIDEO_CAPTURE=1) + AC_CHECK_HEADER(machine/ioctl_meteor.h, HAS_VIDEO_CAPTURE=1) + AC_CHECK_HEADER(i386/ioctl_meteor.h, HAS_VIDEO_CAPTURE=1) + AC_CHECK_HEADER(dev/ic/bt8xx.h, HAS_VIDEO_CAPTURE=1) + AC_CHECK_HEADER(dev/bktr/ioctl_meteor.h, HAS_VIDEO_CAPTURE=1) if test "${HAS_VIDEO_CAPTURE}z" = "z" ; then AC_MSG_NOTICE(No Video Capture support) AC_DEFINE([NO_VIDEO_CAPTURE], [], [No video capture]) @@ -2335,6 +2350,9 @@ STDCCFLAGS="$STDCCFLAGS -fexceptions" fi +STDCCFLAGS="$CPPFLAGS $STDCCFLAGS" +STDCXXFLAGS="$CPPFLAGS $STDCXXFLAGS" + dnl ######################################################################## dnl final declarations