dnl ############################################################# dnl # dnl # For information about autoconf, see: dnl # dnl # http://www.gnu.org/software/autoconf/ dnl # dnl # dnl ############################################################# dnl ######################################## dnl # dnl # Autoconf and automake initialization dnl # dnl ######################################## AC_INIT([jdec],[4.2]) AC_CONFIG_AUX_DIR([config]) dnl # AC_PREFIX_DEFAULT([/usr/local/jdec-AC_PACKAGE_VERSION]) dnl#init automake AM_INIT_AUTOMAKE dnl#config pkg-config PKG_PROG_PKG_CONFIG dnl#init libtool AC_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) dnl#init dirs libdir='${exec_prefix}/lib/jdec' includedir='${prefix}/include/jdec' AC_SUBST([driverdir],['${libdir}/drivers']) AC_SUBST([schemadir],['${libdir}/schemas']) AC_SUBST([servicedir],['${libdir}/services']) AC_SUBST([confdir],['${datadir}/${PACKAGE}/conf']) AC_SUBST([gladedir],['${datadir}/${PACKAGE}/glade']) dnl ######################################## dnl # dnl # command line options and precious variables dnl # dnl ######################################## dnl##### switches to enable/disable features dnl### evi driver switch AC_ARG_ENABLE([drivers-evi], [AS_HELP_STRING([--disable-drivers-evi], [disable evi driver compilation])], [], [enable_drivers_evi=yes]) dnl### fw driver switch AC_ARG_ENABLE([drivers-firewire], [AS_HELP_STRING([--disable-drivers-firewire], [disable firewire driver compilation])], [], [enable_drivers_firewire=yes]) dnl### gazebo driver switch AC_ARG_ENABLE([drivers-gazebo], [AS_HELP_STRING([--disable-drivers-gazebo], [disable gazebo driver compilation])], [], [enable_drivers_gazebo=yes]) dnl### graphics_gtk driver switch AC_ARG_ENABLE([drivers-graphics_gtk], [AS_HELP_STRING([--disable-drivers-graphics_gtk], [disable graphics_gtk driver compilation])], [], [enable_drivers_graphics_gtk=yes]) dnl### graphics_xforms driver switch AC_ARG_ENABLE([drivers-graphics_xforms], [AS_HELP_STRING([--disable-drivers-graphics_xforms], [disable graphics_xforms driver compilation])], [], [enable_drivers_graphics_xforms=yes]) dnl### imagefile driver switch AC_ARG_ENABLE([drivers-imagefile], [AS_HELP_STRING([--disable-drivers-imagefile], [disable imagefile driver compilation])], [], [enable_drivers_imagefile=yes]) dnl### mplayer driver switch AC_ARG_ENABLE([drivers-mplayer], [AS_HELP_STRING([--disable-drivers-mplayer], [disable mplayer driver compilation])], [], [enable_drivers_mplayer=yes]) dnl### networkclient driver switch AC_ARG_ENABLE([drivers-networkclient], [AS_HELP_STRING([--disable-drivers-networkclient], [disable networkclient driver compilation])], [], [enable_drivers_networkclient=yes]) dnl### networkserver driver switch AC_ARG_ENABLE([drivers-networkserver], [AS_HELP_STRING([--disable-drivers-networkserver], [disable networkserver driver compilation])], [], [enable_drivers_networkserver=yes]) dnl### pantilt driver switch AC_ARG_ENABLE([drivers-pantilt], [AS_HELP_STRING([--disable-drivers-pantilt], [disable pantilt driver compilation])], [], [enable_drivers_pantilt=yes]) dnl### player driver switch AC_ARG_ENABLE([drivers-player], [AS_HELP_STRING([--disable-drivers-player], [disable player driver compilation])], [], [enable_drivers_player=yes]) dnl### wiimote driver switch AC_ARG_ENABLE([drivers-wiimote], [AS_HELP_STRING([--disable-drivers-wiimote], [disable wiimote driver compilation])], [], [enable_drivers_wiimote=yes]) AC_ARG_ENABLE([schemas-calibrador], [AS_HELP_STRING([--disable-schemas-calibrador],[disable calibrador schema compilation])], [], [enable_schemas_calibrador=yes]) AC_ARG_ENABLE([schemas-esquema_prueba], [AS_HELP_STRING([--disable-schemas-esquema_prueba],[disable esquema_prueba1 schema compilation])], [], [enable_schemas_esquema_prueba=yes]) AC_ARG_ENABLE([schemas-eyeoperator], [AS_HELP_STRING([--enable-schemas-eyeoperator],[enable eyeoperator1/4 schema compilation])], [], [enable_schemas_eyeoperator=no]) AC_ARG_ENABLE([schemas-followball], [AS_HELP_STRING([--disable-schemas-followball],[disable followball schema compilation])], [], [enable_schemas_followball=yes]) AC_ARG_ENABLE([schemas-hsvtuner], [AS_HELP_STRING([--disable-schemas-hsvtuner],[disable hsvtuner schema compilation])], [], [enable_schemas_hsvtuner=yes]) AC_ARG_ENABLE([schemas-image_viewer], [AS_HELP_STRING([--disable-schemas-image_viewer],[disable image_viewer schema compilation])], [], [enable_schemas_image_viewer=yes]) AC_ARG_ENABLE([schemas-imgrectifier], [AS_HELP_STRING([--disable-schemas-imgrectifier],[disable imgrectifier schema compilation])], [], [enable_schemas_imgrectifier=yes]) AC_ARG_ENABLE([schemas-introrob], [AS_HELP_STRING([--disable-schemas-introrob],[disable introrob schema compilation])], [], [enable_schemas_introrob=yes]) AC_ARG_ENABLE([schemas-mastergui], [AS_HELP_STRING([--disable-schemas-mastergui],[disable mastergui schema compilation])], [], [enable_schemas_mastergui=yes]) AC_ARG_ENABLE([schemas-opengldemo], [AS_HELP_STRING([--disable-schemas-opengldemo],[disable opengldemo schema compilation])], [], [enable_schemas_opengldemo=yes]) AC_ARG_ENABLE([schemas-opflow], [AS_HELP_STRING([--enable-schemas-opflow],[enable opflow schema compilation])], [], [enable_schemas_opflow=no]) AC_ARG_ENABLE([schemas-recorder], [AS_HELP_STRING([--disable-schemas-recorder],[disable recorder schema compilation])], [], [enable_schemas_recorder=yes]) AC_ARG_ENABLE([schemas-teleoperator], [AS_HELP_STRING([--disable-schemas-teleoperator],[disable teleoperator schema compilation])], [], [enable_schemas_teleoperator=yes]) AC_ARG_ENABLE([schemas-wiimote_viewer], [AS_HELP_STRING([--disable-schemas-wiimote_viewer],[disable wiimote_viewer schema compilation])], [], [enable_schemas_wiimote_viewer=yes]) dnl##### external software FIXME: poner argumento como optativo, escapar [] AC_ARG_WITH([player], [AS_HELP_STRING([--with-player=],[player software prefix path])], [], [with_player="/usr/local"]) AC_ARG_WITH([gazebo], [AS_HELP_STRING([--with-gazebo=],[gazebo software prefix path])], [], [with_gazebo="/usr/local"]) AC_ARG_WITH([ipp], [AS_HELP_STRING([--with-ipp=],[ipp software prefix path])], [], [with_ipp="/usr/local"]) dnl##### precious variables dnl # Allow user to define variables AC_ARG_VAR([FDESIGN],[command used to build xforms guis]) AC_ARG_VAR([DOXYGEN],[command used to generate code documentation]) AC_ARG_VAR([LATEX],[tex compiler command]) AC_ARG_VAR([PDFLATEX],[pdf generator command]) AC_ARG_VAR([DVIPS],[dvi to ps conversion command]) AC_ARG_VAR([BIBTEX],[latex bibliography generator command]) dnl ######################################## dnl # dnl # compiler options dnl # dnl ######################################## dnl # set compiler flags CFLAGS="-g -pedantic -Wall" dnl # check gcc AC_PROG_CC CXXFLAGS="-g -pedantic -Wall" AC_PROG_CXX dnl # check stdc headers AC_HEADER_STDC dnl ######################################## dnl # dnl # core headers and libraries check dnl # dnl ######################################## dnl # check dl AC_CHECK_HEADERS([dlfcn.h]) AC_CHECK_LIB([dl],[dlopen], [LIBS="$LIBS -ldl"], AC_MSG_ERROR([dl library not found])) dnl # check ptheads AC_CHECK_HEADERS([pthread.h],[],AC_MSG_ERROR([pthread.h not found])) AC_CHECK_LIB([pthread],[pthread_create], [CFLAGS="$CFLAGS -pthread -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"], AC_MSG_ERROR([pthread library not found])) dnl ######################################## dnl # dnl # external software check dnl # dnl ######################################## AC_ARG_VAR([PLAYER_CFLAGS],[C compiler flags for player]) AC_ARG_VAR([PLAYER_LIBS],[linker flags for player]) if test "x$with_player" != xno; then PLAYER_PREFIX=$with_player _SAVE_CFLAGS=$CFLAGS _SAVE_CPPFLAGS=$CPPFLAGS _SAVE_LIBS=$LIBS PLAYER_INCLUDE=`find $PLAYER_PREFIX -name "player-*"` CFLAGS="$CFLAGS -I$PLAYER_INCLUDE $PLAYER_CFLAGS" CPPFLAGS="$CPPFLAGS -I$PLAYER_INCLUDE $PLAYER_CPPFLAGS" LIBS="$LIBS -L$PLAYER_PREFIX/lib $PLAYER_LIBS" PLAYER_VERSION=`basename $PLAYER_INCLUDE` AC_MSG_NOTICE([*** Checking player: $PLAYER_VERSION]) ERRORS="" AC_CHECK_HEADERS([libplayerc/playerc.h], [], [ERRORS="$ac_header not found"]) AC_CHECK_LIB([playerc],[main], [], [ERRORS="$ERRORS, libplayerc not found"]) if test "$ERRORS"; then AC_MSG_NOTICE([Player disabled: $ERRORS]) with_player="no" else PLAYER_CFLAGS="-I$PLAYER_INCLUDE $PLAYER_CFLAGS" PLAYER_LIBS="-L$PLAYER_PREFIX/lib $PLAYER_LIBS" fi CFLAGS=$_SAVE_CFLAGS CPPFLAGS=$_SAVE_CPPFLAGS LIBS=$_SAVE_LIBS fi AC_SUBST([PLAYER_CFLAGS]) AC_SUBST([PLAYER_LIBS]) AC_ARG_VAR([GAZEBO_CFLAGS],[C compiler flags for gazebo]) AC_ARG_VAR([GAZEBO_LIBS],[linker flags for gazebo]) if test "x$with_gazebo" != xno; then GAZEBO_PREFIX=$with_gazebo _SAVE_CFLAGS=$CFLAGS _SAVE_CPPFLAGS=$CPPFLAGS _SAVE_LIBS=$LIBS CFLAGS="$CFLAGS -I$GAZEBO_PREFIX/include $GAZEBO_CFLAGS" CPPFLAGS="$CPPFLAGS -I$GAZEBO_PREFIX/include $GAZEBO_CPPFLAGS" LIBS="$LIBS -L$GAZEBO_PREFIX/lib $GAZEBO_LIBS" AC_MSG_NOTICE([*** Checking gazebo:]) ERRORS="" AC_CHECK_HEADERS([gazebo.h], [], [ERRORS="$ac_header not found"]) AC_CHECK_LIB([gazebo],[main], [], [ERRORS="$ERRORS, libgazebo not found"]) if test "$ERRORS"; then AC_MSG_NOTICE([Gazebo disabled: $ERRORS]) with_gazebo="no" else GAZEBO_CFLAGS="-I$GAZEBO_PREFIX/include $GAZEBO_CFLAGS" GAZEBO_LIBS="-L$GAZEBO_PREFIX/lib $GAZEBO_LIBS" fi CFLAGS=$_SAVE_CFLAGS CPPFLAGS=$_SAVE_CPPFLAGS LIBS=$_SAVE_LIBS fi AC_SUBST([GAZEBO_CFLAGS]) AC_SUBST([GAZEBO_LIBS]) AC_ARG_VAR([IPP_CFLAGS],[C compiler flags for ipp]) AC_ARG_VAR([IPP_LIBS],[linker flags for ipp]) if test "x$with_ipp" != xno; then IPP_PREFIX=$with_ipp _SAVE_CFLAGS=$CFLAGS _SAVE_CPPFLAGS=$CPPFLAGS _SAVE_LIBS=$LIBS CFLAGS="$CFLAGS -I$IPP_PREFIX/include $IPP_CFLAGS" CPPFLAGS="$CPPFLAGS -I$IPP_PREFIX/include $IPP_CPPFLAGS" LIBS="$LIBS -L$IPP_PREFIX/lib $IPP_LIBS" AC_MSG_NOTICE([*** Checking ipp:]) ERRORS="" AC_CHECK_HEADERS([ipp.h], [], [ERRORS="$ac_header not found"]) AC_CHECK_LIB([ippcore],[main], [], [ERRORS="$ERRORS, libippcore not found"]) if test "$ERRORS"; then AC_MSG_NOTICE([Ipp disabled: $ERRORS]) with_ipp="no" else IPP_CFLAGS="-I$IPP_PREFIX/include $IPP_CFLAGS" IPP_LIBS="-L$IPP_PREFIX/lib $IPP_LIBS" fi CFLAGS=$_SAVE_CFLAGS CPPFLAGS=$_SAVE_CPPFLAGS LIBS=$_SAVE_LIBS fi AC_SUBST([IPP_CFLAGS]) AC_SUBST([IPP_LIBS]) dnl ######################################## dnl # dnl # drivers headers and libraries checks dnl # dnl # * _CFLAGS and _LIBS can be defined as environment variables in dnl # configure time to set paths and other compile/link options dnl # dnl ######################################## AC_MSG_NOTICE([*** Checking drivers:]) dnl#check evi deps AM_CONDITIONAL([ENABLE_EVI],[false]) if test "x$enable_drivers_evi" != xno; then AC_MSG_NOTICE([**** Checking driver evi:]) ENABLED_DRIVERS="$ENABLED_DRIVERS evi" AM_CONDITIONAL([ENABLE_EVI],[true]) fi AC_SUBST([EVI_CFLAGS]) AC_SUBST([EVI_LIBS]) dnl#check firewire deps AM_CONDITIONAL([ENABLE_FIREWIRE],[false]) if test "x$enable_drivers_firewire" != xno; then AC_MSG_NOTICE([**** Checking driver firewire:]) PKG_CHECK_MODULES([FIREWIRE],[libraw1394 libdc1394], [ENABLED_DRIVERS="$ENABLED_DRIVERS firewire" AM_CONDITIONAL([ENABLE_FIREWIRE],[true])], [AC_MSG_FAILURE([--enable-drivers-firewire was given, but there was errors: $FIREWIRE_PKG_ERRORS])]) fi dnl#check gazebo deps AM_CONDITIONAL([ENABLE_GAZEBO],[false]) if test "x$enable_drivers_gazebo" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking driver gazebo:]) if test "x$with_gazebo" = xno; then ERRORS="gazebo software not found, use --with-gazebo=" fi if test "$ERRORS"; then AC_MSG_FAILURE([--enable-drivers-gazebo was given, but there was errors: $ERRORS]) else ENABLED_DRIVERS="$ENABLED_DRIVERS gazebo" AM_CONDITIONAL([ENABLE_GAZEBO],[true]) fi fi dnl#check graphics_gtk deps AM_CONDITIONAL([ENABLE_GRAPHICS_GTK],[false]) if test "x$enable_drivers_graphics_gtk" != xno; then AC_MSG_NOTICE([**** Checking driver graphics_gtk:]) PKG_CHECK_MODULES([GRAPHICS_GTK],[gtkglext-1.0 gdkglext-1.0 gthread-2.0 libglade-2.0], [ENABLED_DRIVERS="$ENABLED_DRIVERS graphics_gtk" AM_CONDITIONAL([ENABLE_GRAPHICS_GTK],[true])], [AC_MSG_FAILURE([--enable-drivers-graphics_gtk was given, but there was errors: $GRAPHICS_GTK_PKG_ERRORS])]) fi dnl#workarround to see forms.h if found in /usr/include/X11 CFLAGS="$CFLAGS -I/usr/include/X11" CPPFLAGS="$CFLAGS -I/usr/include/X11" CXXFLAGS="$CXXFLAGS -I/usr/include/X11" dnl#check graphics_xforms deps AM_CONDITIONAL([ENABLE_GRAPHICS_XFORMS],[false]) if test "x$enable_drivers_graphics_xforms" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking driver graphics_xforms:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [GRAPHICS_XFORMS_LIBS="$GRAPHICS_XFORMS_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [GRAPHICS_XFORMS_LIBS="$GRAPHICS_XFORMS_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-drivers-graphics_xforms was given, but there was errors: $ERRORS]) else ENABLED_DRIVERS="$ENABLED_DRIVERS graphics_xforms" AM_CONDITIONAL([ENABLE_GRAPHICS_XFORMS],[true]) fi fi dnl#check imagefile deps AM_CONDITIONAL([ENABLE_IMAGEFILE],[false]) if test "x$enable_drivers_imagefile" != xno; then AC_MSG_NOTICE([**** Checking driver imagefile:]) ENABLED_DRIVERS="$ENABLED_DRIVERS imagefile" AM_CONDITIONAL([ENABLE_IMAGEFILE],[true]) fi dnl#check mplayer deps FIXME: variable overrides check?? AC_ARG_VAR([MPLAYER],[command used by mplayer driver as video source]) AC_ARG_VAR([MENCODER],[command used by mplayer driver as video source]) AM_CONDITIONAL([ENABLE_MPLAYER],[false]) if test "x$enable_drivers_mplayer" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking driver mplayer:]) AC_PATH_PROG([MPLAYER],[mplayer],[no]) if test "x$MPLAYER" = xno; then ERRORS="mplayer not found" fi AC_PATH_PROG([MENCODER],[mencoder],[no]) if test "x$MENCODER" = xno; then ERRORS="$ERRORS, mencoder not found" fi if test "$ERRORS"; then AC_MSG_FAILURE([--enable-drivers-mplayer was given, but there was errors: $ERRORS]) else ENABLED_DRIVERS="$ENABLED_DRIVERS mplayer" AM_CONDITIONAL([ENABLE_MPLAYER],[true]) fi fi dnl#check networkclient deps AM_CONDITIONAL([ENABLE_NETWORKCLIENT],[false]) if test "x$enable_drivers_networkclient" != xno; then AC_MSG_NOTICE([**** Checking driver networkclient:]) ENABLED_DRIVERS="$ENABLED_DRIVERS networkclient" AM_CONDITIONAL([ENABLE_NETWORKCLIENT],[true]) fi dnl#check networkserver deps AM_CONDITIONAL([ENABLE_NETWORKSERVER],[false]) if test "x$enable_drivers_networkserver" != xno; then AC_MSG_NOTICE([**** Checking driver networkserver:]) ENABLED_DRIVERS="$ENABLED_DRIVERS networkserver" AM_CONDITIONAL([ENABLE_NETWORKSERVER],[true]) fi dnl#check pantilt deps AM_CONDITIONAL([ENABLE_PANTILT],[false]) if test "x$enable_drivers_pantilt" != xno; then AC_MSG_NOTICE([**** Checking driver pantilt:]) ENABLED_DRIVERS="$ENABLED_DRIVERS pantilt" AM_CONDITIONAL([ENABLE_PANTILT],[true]) fi dnl#check player deps AM_CONDITIONAL([ENABLE_PLAYER],[false]) if test "x$enable_drivers_player" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking driver player:]) if test "x$with_player" = xno; then ERRORS="player software not found, use --with-player=" fi if test "$ERRORS"; then AC_MSG_FAILURE([--enable-drivers-player was given, but there was errors: $ERRORS]) else ENABLED_DRIVERS="$ENABLED_DRIVERS player" AM_CONDITIONAL([ENABLE_PLAYER],[true]) fi fi dnl#check wiimote deps AM_CONDITIONAL([ENABLE_WIIMOTE],[false]) if test "x$enable_drivers_wiimote" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking driver wiimote:]) AC_CHECK_HEADERS([cwiid.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([cwiid],[main], [WIIMOTE_LIBS="$WIIMOTE_LIBS -lcwiid"], [ERRORS="$ERRORS, libcwiid not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-drivers-wiimote was given, but there was errors: $ERRORS]) else ENABLED_DRIVERS="$ENABLED_DRIVERS wiimote" AM_CONDITIONAL([ENABLE_WIIMOTE],[true]) fi fi AC_SUBST([ENABLED_DRIVERS]) dnl ######################################## dnl # dnl # doc checks dnl # dnl ######################################## dnl FIXME: que hacer si los chequeos fallan? AC_PATH_PROG([DOXYGEN],[doxygen]) AC_PATH_PROG([LATEX],[latex]) AC_PATH_PROG([PDFLATEX],[pdflatex]) AC_PATH_PROG([DVIPS],[dvips]) AC_PATH_PROG([BIBTEX],[bibtex]) dnl ######################################## dnl # dnl # schemas checks dnl # dnl # * _CFLAGS and _LIBS can be defined as environment variables in dnl # configure time to set paths and other compile/link options dnl # dnl ######################################## AC_MSG_NOTICE([*** Checking schemas:]) dnl # schema calibrador AM_CONDITIONAL([ENABLE_CALIBRADOR],[false]) if test "x$enable_schemas_calibrador" != xno; then AC_MSG_NOTICE([**** Checking schema calibrador:]) PKG_CHECK_MODULES([CALIBRADOR],[gsl glib-2.0], [ENABLED_SCHEMAS="$ENABLED_SCHEMAS calibrador" AM_CONDITIONAL([ENABLE_CALIBRADOR],[true])], [AC_MSG_FAILURE([--enable-schemas-calibrador was given, but there was errors: $CALIBRADOR_PKG_ERRORS])]) ERRORS="" AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h glcanvas.h GL/gl.h GL/glx.h GL/glu.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [CALIBRADOR_LIBS="$CALIBRADOR_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [CALIBRADOR_LIBS="$CALIBRADOR_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_CHECK_LIB([formsGL],[main], [CALIBRADOR_LIBS="$CALIBRADOR_LIBS -lformsGL"], [ERRORS="$ERRORS, libformsGL not found"],[-lm]) AC_CHECK_LIB([GL],[main], [CALIBRADOR_LIBS="$CALIBRADOR_LIBS -lGL"], [ERRORS="$ERRORS, libGL not found"]) AC_CHECK_LIB([GLU],[main], [CALIBRADOR_LIBS="$CALIBRADOR_LIBS -lGLU"], [ERRORS="$ERRORS, libGLU not found"]) AC_CHECK_LIB([glut],[main], [CALIBRADOR_LIBS="$CALIBRADOR_LIBS -lglut"], [ERRORS="$ERRORS, libglut not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build calibrador schema not found"]) fi dnl # schema esquema_prueba AM_CONDITIONAL([ENABLE_ESQUEMA_PRUEBA],[false]) if test "x$enable_schemas_esquema_prueba" != xno; then AC_MSG_NOTICE([**** Checking schema esquema_prueba:]) PKG_CHECK_MODULES([ESQUEMA_PRUEBA],[gtkglext-1.0 gdkglext-1.0 gthread-2.0 libglade-2.0], [ENABLED_SCHEMAS="$ENABLED_SCHEMAS esquema_prueba" AM_CONDITIONAL([ENABLE_ESQUEMA_PRUEBA],[true])], [AC_MSG_FAILURE([--enable-schemas-esquema_prueba was given, but there was errors: $ESQUEMA_PRUEBA_PKG_ERRORS])]) fi dnl#check eyeoperator1/4 AM_CONDITIONAL([ENABLE_EYEOPERATOR],[false]) if test "x$enable_schemas_eyeoperator" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking schema eyeoperator1/4:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [EYEOPERATOR_PKG_ERRORS="$EYEOPERATOR_PKG_ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [EYEOPERATOR_LIBS="$EYEOPERATOR_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [EYEOPERATOR_LIBS="$EYEOPERATOR_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build eyeoperator schema not found"]) if test "x$with_ipp" = xno; then ERRORS="$ERRORS, ipp software not found, use --with-ipp=" fi if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-eyeoperator was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS eyeoperator" AM_CONDITIONAL([ENABLE_EYEOPERATOR],[true]) fi CFLAGS=$_SAVE_CFLAGS LIBS=$_SAVE_LIBS fi dnl # schema followball AM_CONDITIONAL([ENABLE_FOLLOWBALL],[false]) if test "x$enable_schemas_followball" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking schema followball:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [FOLLOWBALL_LIBS="$FOLLOWBALL_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [FOLLOWBALL_LIBS="$FOLLOWBALL_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build followball schema not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-followball was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS followball" AM_CONDITIONAL([ENABLE_FOLLOWBALL],[true]) fi fi dnl # schema hsvtuner AM_CONDITIONAL([ENABLE_HSVTUNER],[false]) if test "x$enable_schemas_hsvtuner" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking schema hsvtuner:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [HSVTUNER_LIBS="$HSVTUNER_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [HSVTUNER_LIBS="$HSVTUNER_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build hsvtuner schema not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-hsvtuner was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS hsvtuner" AM_CONDITIONAL([ENABLE_HSVTUNER],[true]) fi fi dnl # schema image_viewer AM_CONDITIONAL([ENABLE_IMAGE_VIEWER],[false]) if test "x$enable_schemas_image_viewer" != xno; then AC_MSG_NOTICE([**** Checking schema image_viewer:]) PKG_CHECK_MODULES([IMAGE_VIEWER],[gtkglext-1.0 gdkglext-1.0 gthread-2.0 libglade-2.0], [ENABLED_SCHEMAS="$ENABLED_SCHEMAS image_viewer" AM_CONDITIONAL([ENABLE_IMAGE_VIEWER],[true])], [AC_MSG_FAILURE([--enable-schemas-image_viewer was given, but there was errors: $IMAGE_VIEWER_PKG_ERRORS])]) fi dnl # schema imgrectifier AM_CONDITIONAL([ENABLE_IMGRECTIFIER],[false]) if test "x$enable_schemas_imgrectifier" != xno; then AC_MSG_NOTICE([**** Checking schema imgrectifier:]) PKG_CHECK_MODULES([IMGRECTIFIER],[gtkglext-1.0 gdkglext-1.0 gthread-2.0 libglade-2.0 gsl], [ENABLED_SCHEMAS="$ENABLED_SCHEMAS imgrectifier" AM_CONDITIONAL([ENABLE_IMGRECTIFIER],[true])], [AC_MSG_FAILURE([--enable-schemas-imgrectifier was given, but there was errors: $IMGRECTIFIER_PKG_ERRORS])]) fi dnl # schema introrob AM_CONDITIONAL([ENABLE_INTROROB],[false]) if test "x$enable_schemas_introrob" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking schema introrob:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [INTROROB_LIBS="$INTROROB_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [INTROROB_LIBS="$INTROROB_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build introrob schema not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-introrob was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS introrob" AM_CONDITIONAL([ENABLE_INTROROB],[true]) fi fi dnl # schema mastergui AM_CONDITIONAL([ENABLE_MASTERGUI],[false]) if test "x$enable_schemas_mastergui" != xno; then ERRORS="" AC_MSG_NOTICE([**** Checking schema mastergui:]) PKG_CHECK_MODULES([MASTERGUI],[gtkglext-1.0 gdkglext-1.0 gthread-2.0 libglade-2.0], [ENABLED_SCHEMAS="$ENABLED_SCHEMAS mastergui" AM_CONDITIONAL([ENABLE_MASTERGUI],[true])], [AC_MSG_FAILURE([--enable-schemas-mastergui was given, but there was errors: $MASTERGUI_PKG_ERRORS])]) fi dnl # schema opengldemo if test "x$enable_schemas_opengldemo" = xno; then AM_CONDITIONAL([ENABLE_OPENGLDEMO],[false]) else ERRORS="" AC_MSG_NOTICE([**** Checking schema opengldemo:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h glcanvas.h GL/gl.h GL/glx.h GL/glu.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [OPENGLDEMO_LIBS="$OPENGLDEMO_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [OPENGLDEMO_LIBS="$OPENGLDEMO_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_CHECK_LIB([formsGL],[main], [OPENGLDEMO_LIBS="$OPENGLDEMO_LIBS -lformsGL"], [ERRORS="$ERRORS, libformsGL not found"],[-lm]) AC_CHECK_LIB([GL],[main], [OPENGLDEMO_LIBS="$OPENGLDEMO_LIBS -lGL"], [ERRORS="$ERRORS, libGL not found"]) AC_CHECK_LIB([GLU],[main], [OPENGLDEMO_LIBS="$OPENGLDEMO_LIBS -lGLU"], [ERRORS="$ERRORS, libGLU not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build opengldemo schema not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-opengldemo was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS opengldemo" AM_CONDITIONAL([ENABLE_OPENGLDEMO],[true]) fi fi dnl # schema opflow if test "x$enable_schemas_opflow" = xno; then AM_CONDITIONAL([ENABLE_OPFLOW],[false]) else ERRORS="" AC_MSG_NOTICE([**** Checking schema opflow:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [OPFLOW_LIBS="$OPFLOW_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [OPFLOW_LIBS="$OPFLOW_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build opflow schema not found"]) if test "x$with_ipp" = xno; then ERRORS="$ERRORS, ipp software not found, use --with-ipp=" fi if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-opflow was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS opflow" AM_CONDITIONAL([ENABLE_OPFLOW],[true]) fi fi dnl # schema recorder if test "x$enable_schemas_recorder" = xno; then AM_CONDITIONAL([ENABLE_RECORDER],[false]) else ERRORS="" AC_MSG_NOTICE([**** Checking schema recorder:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [RECORDER_LIBS="$RECORDER_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [RECORDER_LIBS="$RECORDER_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build recorder schema not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-recorder was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS recorder" AM_CONDITIONAL([ENABLE_RECORDER],[true]) fi fi dnl # schema teleoperator if test "x$enable_schemas_teleoperator" = xno; then AM_CONDITIONAL([ENABLE_TELEOPERATOR],[false]) else ERRORS="" AC_MSG_NOTICE([**** Checking schema teleoperator:]) AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h X11/Xos.h X11/Xatom.h forms.h glcanvas.h GL/gl.h GL/glx.h GL/glu.h], [], [ERRORS="$ERRORS, $ac_header not found"]) AC_CHECK_LIB([forms],[main], [TELEOPERATOR_LIBS="$TELEOPERATOR_LIBS -lforms"], [ERRORS="$ERRORS, libforms not found"],[-lm]) AC_CHECK_LIB([X11],[main], [TELEOPERATOR_LIBS="$TELEOPERATOR_LIBS -lX11"], [ERRORS="$ERRORS, libX11 not found"]) AC_CHECK_LIB([formsGL],[main], [TELEOPERATOR_LIBS="$TELEOPERATOR_LIBS -lformsGL"], [ERRORS="$ERRORS, libformsGL not found"],[-lm]) AC_CHECK_LIB([GL],[main], [TELEOPERATOR_LIBS="$TELEOPERATOR_LIBS -lGL"], [ERRORS="$ERRORS, libGL not found"]) AC_CHECK_LIB([GLU],[main], [TELEOPERATOR_LIBS="$TELEOPERATOR_LIBS -lGLU"], [ERRORS="$ERRORS, libGLU not found"]) AC_PATH_PROG([FDESIGN],[fdesign], [ERRORS="$ERRORS, fdesign needed to build teleoperator schema not found"]) if test "$ERRORS"; then AC_MSG_FAILURE([--enable-schemas-teleoperator was given, but there was errors: $ERRORS]) else ENABLED_SCHEMAS="$ENABLED_SCHEMAS teleoperator" AM_CONDITIONAL([ENABLE_TELEOPERATOR],[true]) fi fi dnl # schema wiimote_viewer if test "x$enable_schemas_wiimote_viewer" = xno; then AM_CONDITIONAL([ENABLE_WIIMOTE_VIEWER],[false]) else AC_MSG_NOTICE([**** Checking schema wiimote_viewer:]) PKG_CHECK_MODULES([WIIMOTE_VIEWER],[gtkglext-1.0 gdkglext-1.0 gthread-2.0 libglade-2.0], [ENABLED_SCHEMAS="$ENABLED_SCHEMAS wiimote_viewer" AM_CONDITIONAL([ENABLE_WIIMOTE_VIEWER],[true])], [AC_MSG_FAILURE([--enable-schemas-wiimote_viewer was given, but there was errors: $WIIMOTE_VIEWER_PKG_ERRORS])]) fi dnl ######################################## dnl # dnl # libs checks dnl # dnl ######################################## AC_MSG_NOTICE([*** Checking utils:]) dnl ######################################## dnl # dnl # examples generators check dnl # dnl ######################################## dnl ######################################## dnl # dnl # Generate output, main and core makefiles dnl # dnl ######################################## AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([base/Makefile]) dnl # generate utils Makefiles AC_CONFIG_FILES([libs/Makefile \ libs/colorspaces/Makefile \ libs/fuzzylib/Makefile \ libs/pioneer/Makefile \ libs/progeo/Makefile]) dnl # generate driver Makefiles AC_CONFIG_FILES([drivers/Makefile \ drivers/evi/Makefile \ drivers/firewire/Makefile \ drivers/gazebo/Makefile \ drivers/imagefile/Makefile \ drivers/mplayer/Makefile \ drivers/networkclient/Makefile \ drivers/pantilt/Makefile \ drivers/player/Makefile \ drivers/wiimote/Makefile]) dnl # generate schemas Makefiles AC_CONFIG_FILES([schemas/Makefile \ schemas/calibrador/Makefile \ schemas/esquema_prueba/Makefile \ schemas/eyeoperator1/Makefile \ schemas/eyeoperator4/Makefile \ schemas/followball/Makefile \ schemas/hsvtuner/Makefile \ schemas/image_viewer/Makefile \ schemas/imgrectifier/Makefile \ schemas/introrob/Makefile \ schemas/mastergui/Makefile \ schemas/opengldemo/Makefile \ schemas/opflow/Makefile \ schemas/recorder/Makefile \ schemas/teleoperator/Makefile \ schemas/wiimote_viewer/Makefile]) dnl # generate services Makefiles AC_CONFIG_FILES([services/Makefile \ services/graphics_gtk/Makefile \ services/graphics_xforms/Makefile \ services/networkserver/Makefile]) dnl # generate docs Makefiles AC_CONFIG_FILES([docs/Makefile]) AC_OUTPUT