AC_INIT(system/kernel/pdp.c) AC_CONFIG_HEADER(include/pdp_config.h) AC_PROG_CC AC_HEADER_STDC dnl TAG CVS WHEN RELEASE VERSION CHANGES !!! PDP_VERSION=0.12.2 AC_SUBST(PDP_VERSION) AC_ARG_ENABLE(pwc, [ --enable-pwc enable additional Philips WebCam support], AC_DEFINE(HAVE_PWCV4L, 1,enable pwc v4l support)) AC_ARG_ENABLE(mmx, [ --enable-mmx enable MMX support], MMX=yes, MMX=no) AC_ARG_ENABLE(sdl, [ --enable-sdl enable SDL support], SDL=yes, SDL=no) if test $prefix == NONE; then prefix=/usr/local fi dnl try to locate the pd header in case the setup is nonstandard dnl check in $prefix/pd/src then ../pd/src dnl if this fails we trust it is in the standard include path PWD=`pwd` if test -f $prefix/pd/src/m_pd.h; then PD_CPPFLAGS="-I$prefix/pd/src" elif test -f $prefix/src/pd/src/m_pd.h; then PD_CPPFLAGS="-I$prefix/src/pd/src" elif test -f $PWD/../pd/src/m_pd.h; then PD_CPPFLAGS="-I$PWD/../pd/src" elif test -f $PWD/../src/m_pd.h; then PD_CPPFLAGS="-I$PWD/../src" fi CPPFLAGS="$CPPFLAGS $PD_CPPFLAGS" AC_CHECK_HEADER(m_pd.h,, echo "WARNING: m_pd.h not found. Is PD installed?" echo "WARNING: if you have changed PD_CPPFLAGS in Makefile.config.in you can ignore this warning." ) AC_CHECK_LIB(m,sin) ARCH=`uname -s` if test $ARCH == Linux; then PDP_LIBRARY_NAME=pdp.pd_linux if test $MMX == yes; then PDP_TARGET=linux_mmx else PDP_TARGET=linux fi elif test $ARCH == Darwin; then PDP_LIBRARY_NAME=pdp.pd_darwin PDP_TARGET=darwin else echo WARNING: Architecture `uname -s` not supported. exit fi dnl Darwin specific stuff: this is still pretty experimental dnl How to test if frameworks are present ???? if test $ARCH == Darwin then PD_EXECUTABLE=$prefix/bin/pd LIBS="$LIBS -L/sw/lib" CPPFLAGS="$CPPFLAGS -I/sw/include" PDP_EXTRA_CPPFLAGS="-I/sw/include" dnl if not darwin, assume target is linux else PDP_EXTRA_CFLAGS=-Werror AC_CHECK_HEADER(linux/videodev.h, PDP_OPTMOD="$PDP_OPTMOD pdp_v4l.o" AC_DEFINE(HAVE_PDP_V4L, 1, build pdp_v4l), echo " linux/videodev.h not found: not building pdp_v4l") fi AC_CHECK_LIB(gslcblas,main) AC_CHECK_LIB(gsl,main,, echo "ERROR: libgsl not found" exit) LIBS="$LIBS -lgslcblas -lgsl" AC_CHECK_LIB(Xv, XvPutImage, PDP_OPTMOD="$PDP_OPTMOD pdp_xv.o" LIBS="$LIBS -L/usr/X11R6/lib -lX11 -lXv -lXext" AC_DEFINE(HAVE_PDP_XV, 1, build pdp_xv), echo " libXv not found: not building pdp_xv", -L/usr/X11R6/lib -lX11 -lXext) AC_CHECK_LIB(quicktime, lqt_decode_video, PDP_OPTMOD="$PDP_OPTMOD pdp_qt.o" LIBS="$LIBS -lquicktime" AC_DEFINE(HAVE_PDP_QT, 1, build pdp_qt), echo " libquicktime not found: not building pdp_qt") AC_CHECK_LIB(png, png_read_image, LIBS="$LIBS -lpng" AC_DEFINE(HAVE_PDP_PNG, 1, build png support), echo " libpng not found: not building png support") AC_CHECK_LIB(GL, glXSwapBuffers, PDP_OPTMOD="$PDP_OPTMOD pdp_glx.o" LIBS="$LIBS -lGL -lGLU" AC_DEFINE(HAVE_PDP_GLX, 1, build pdp_glx), echo " libGL not found: not building pdp_glx", -L/usr/X11R6/lib -lGLU) dnl optional sdl stuff if test $SDL == yes then AC_CHECK_LIB(SDL, SDL_Init, PDP_OPTMOD="$PDP_OPTMOD pdp_sdl.o" LIBS="$LIBS -lSDL" AC_DEFINE(HAVE_PDP_SDL, 1, build pdp_sdl), echo " libSDL not found: not building pdp_sdl") fi echo target is $PDP_TARGET AC_SUBST(PD_CPPFLAGS) AC_SUBST(PD_EXECUTABLE) AC_SUBST(PDP_EXTRA_CPPFLAGS) AC_SUBST(PDP_EXTRA_CFLAGS) AC_SUBST(PDP_LIBRARY_NAME) AC_SUBST(PDP_TARGET) AC_SUBST(PDP_OPTMOD) AC_CONFIG_FILES(Makefile.config) AC_CONFIG_FILES(bin/pdp-config) AC_OUTPUT