[Phission-cvs] phission configure.ac,1.44,1.45
Brought to you by:
pthoren
From: Philip T. <pt...@us...> - 2005-03-22 14:07:24
|
Update of /cvsroot/phission/phission In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8901 Modified Files: configure.ac Log Message: Moved some code out. Added check for JRTPLIB Index: configure.ac =================================================================== RCS file: /cvsroot/phission/phission/configure.ac,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** configure.ac 17 Mar 2005 00:10:03 -0000 1.44 --- configure.ac 22 Mar 2005 14:07:12 -0000 1.45 *************** *** 73,80 **** #----------------------------------------------------------------------------- include(m4/ac_auto_include_headers.m4) include(m4/ac_ph_python_devel.m4) include(m4/ac_pkg_swig.m4) include(m4/ac_python_devel.m4) - include(m4/acinclude.m4) include(m4/acx_pthread.m4) include(m4/ax_create_stdint_h.m4) --- 73,88 ---- #----------------------------------------------------------------------------- include(m4/ac_auto_include_headers.m4) + include(m4/acinclude.m4) + include(m4/ac_ph_variadic_macro.m4) + include(m4/ac_ph_x11_devel.m4) + include(m4/ac_ph_v4l_devel.m4) + include(m4/ac_ph_opencv_devel.m4) + include(m4/ac_ph_fltk_devel.m4) + include(m4/ac_ph_sdl_devel.m4) + include(m4/ac_ph_gdi_devel.m4) + include(m4/ac_ph_jrtplib_devel.m4) include(m4/ac_ph_python_devel.m4) include(m4/ac_pkg_swig.m4) include(m4/ac_python_devel.m4) include(m4/acx_pthread.m4) include(m4/ax_create_stdint_h.m4) *************** *** 220,645 **** #------------------------------------------------------------------------- ! # Checks for Video4Linux Headers ! #------------------------------------------------------------------------- ! # Defines: HAVE_IOCTL_H, HAVE_FNCTL_H, HAVE_MMAN_H, HAVE_LINUX_VIDEODEV_H ! #------------------------------------------------------------------------- ! PH_ARG_WITH(v4l,yes, ! Do not try to compile source that use Video4Linux) ! ! AC_CHECK_HEADERS([sys/mman.h],[HAVE_SYS_MMAN_H=1]) ! AC_CHECK_HEADERS([fcntl.h],[HAVE_FNCTL_H=1]) ! AC_CHECK_HEADERS([sys/fcntl.h],[HAVE_SYS_FNCTL_H=1]) ! AC_CHECK_HEADER([sys/ioctl.h],[HAVE_SYS_IOCTL_H=1]) ! AC_CHECK_HEADER([semaphore.h],[HAVE_SEMAPHORE_H=1]) ! AC_CHECK_HEADER([linux/videodev.h],[HAVE_LINUX_VIDEODEV_H=1]) ! ! #------------------------------------------------------------------------- ! # Checks for X Library & Headers ! #------------------------------------------------------------------------- ! # Defines : X_CFLAGS, X_PRE_LIBS, X_EXTRA_LIBS, X_LIBS, no_x ! #------------------------------------------------------------------------- ! AC_PATH_X ! AC_PATH_XTRA ! AC_CHECK_HEADER( [X11/Xlib.h], ! [HAVE_X11_XLIB_H=1]) ! AC_CHECK_HEADER( [X11/Xutil.h], ! [HAVE_X11_XUTIL_H=1]) ! AC_CHECK_HEADER( [X11/Xatom.h], ! [HAVE_X11_XATOM_H=1]) ! AC_CHECK_HEADER( [X11/keysym.h], ! [HAVE_X11_KEYSYM_H=1]) ! ! # ---------------------------------------------------------------------- ! # These are optional extensions that the X11 code will check and ! # either compile in or compile out the related code ! # ---------------------------------------------------------------------- ! #AC_TRY_COMPILE (includes, ! # function-body, ! # [action-if-found], ! # [action-if-not-found]) ! # ---------------------------------------------------------------------- ! AC_ARG_ENABLE(x11-shm, ! [ --enable-x11-shm Enable X11 XShm Extension [default=yes]], ! , enable_x11_shm=yes) ! ! AC_CACHE_CHECK([for X11 XSHM extension], ! ac_cv_x11_extensions_xshm, ! [ ! AC_TRY_COMPILE( ! [ ! #include <stdio.h> ! #include <stdlib.h> ! #include <sys/ipc.h> ! #include <sys/shm.h> ! #include <X11/Xlib.h> ! #include <X11/Xutil.h> ! #include <X11/Xatom.h> ! #include <X11/keysym.h> ! #include <X11/extensions/XShm.h> ! ], ! [ ! int major = 0; ! int minor = 0; ! Bool sharedPixmaps; ! /* We don't need to open the display, we just need this to compile */ ! Display *display = NULL; ! ! printf("Querying XSHM...\n"); ! ! /* Check to see if Double Buffer Extensionn is supported */ ! if (XShmQueryExtension(display) == False) ! { ! printf("XSHM not supported.\n"); ! return -1; ! } ! else ! { ! if (XShmQueryVersion(display,&major,&minor,&sharedPixmaps) == True) ! { ! printf("XDBE v%d.%d Shared Pixmaps: %s\n", ! major,minor,(sharedPixmaps ? "yes" : "no")); ! return 0; ! } ! else ! { ! return -1; ! } ! } ! ], ! ac_cv_x11_extensions_xshm=yes, ! ac_cv_x11_extensions_xshm=no ! ) ! ] ! ) ! if test x"$ac_cv_x11_extensions_xshm" = "xyes" -a \ ! x"$enable_x11_shm" = "xyes"; then ! AC_DEFINE(HAVE_X11_EXTENSIONS_XSHM, 1, ! [Defined if you have X11 Shared Memory extension ]) ! HAVE_X11_EXTENSIONS_XSHM=1 ! fi ! ! # ---------------------------------------------------------------------- ! AC_ARG_ENABLE(x11-xdbe, ! [ --enable-x11-xdbe Enable X11 Xdbe Extension [default=yes]], ! , enable_x11_xdbe=yes) ! ! AC_CACHE_CHECK([for X11 XDBE extension], ! ac_cv_x11_extensions_xdbe, ! [ ! AC_TRY_COMPILE( ! [ ! #include <stdio.h> ! #include <stdlib.h> ! #include <X11/Xlib.h> ! #include <X11/Xutil.h> ! #include <X11/Xatom.h> ! #include <X11/keysym.h> ! #include <X11/extensions/Xdbe.h> ! ], ! [ ! int dbe_version[2] = {0,0}; ! /* We don't need to open the display, we just need this to compile */ ! Display *display = NULL; ! ! printf("Querying XDBE\n"); ! ! /* Check to see if Double Buffer Extensionn is supported */ ! if (XdbeQueryExtension(display, ! &(dbe_version[0]), ! &(dbe_version[1])) == False) ! { ! printf("XDBE not supported.\n"); ! ! return -1; ! } ! else ! { ! printf("XDBE v%d.%d\n", ! dbe_version[0], ! dbe_version[1]); ! ! return 0; ! } ! ], ! ac_cv_x11_extensions_xdbe=yes, ! ac_cv_x11_extensions_xdbe=no ! ) ! ] ! ) ! if test x"$ac_cv_x11_extensions_xdbe" = "xyes" -a \ ! x"$enable_x11_xdbe" = "xyes"; then ! AC_DEFINE(HAVE_X11_EXTENSIONS_XDBE, 1, ! [Defined if you have X11 X Double Buffering extension]) ! HAVE_X11_EXTENSIONS_XDBE=1 ! fi ! ! # ---------------------------------------------------------------------- ! AC_ARG_ENABLE(x11-xf86dga, ! [ --enable-x11-xf86dga Enable X11 XF86DGA Extension [default=yes]], ! , enable_x11_xf86dga=yes) ! ! AC_CACHE_CHECK([for X11 XF86DGA extension], ! ac_cv_x11_extensions_xf86dga, ! [ ! AC_TRY_COMPILE( ! [ ! #include <stdio.h> ! #include <stdlib.h> ! #include <X11/Xlib.h> ! #include <X11/Xutil.h> ! #include <X11/Xatom.h> ! #include <X11/keysym.h> ! #include <X11/extensions/xf86dga.h> ! ], ! [ ! int xdga_errorBase = 0; ! int xdga_eventBase = 0; ! int xdga_version[2] = {0,0}; ! /* We don't need to open the display, we just need this to compile */ ! Display *display = NULL; ! ! printf("Querying XDGA\n"); ! ! if (XDGAQueryExtension( display, ! &xdga_eventBase, ! &xdga_errorBase) == False) ! { ! printf("XDGA extension not supported.\n"); ! ! return -1; ! } ! else ! { ! printf("XDGA - eventBase:%d errorBase:%d\n", ! xdga_eventBase, ! xdga_errorBase ); ! } ! if (XDGAQueryVersion(display, ! &(xdga_version[0]), ! &(xdga_version[1])) == False) ! { ! printf("XDGA not supported.\n"); ! ! return -1; ! } ! else ! { ! printf("XDGA v%d.%d\n", ! xdga_version[0], ! xdga_version[1]); ! ! return 0; ! } ! ], ! ac_cv_x11_extensions_xf86dga=yes, ! ac_cv_x11_extensions_xf86dga=no ! ) ! ] ! ) ! if test x"$ac_cv_x11_extensions_xf86dga" = "xyes" -a \ ! x"$enable_x11_xf86dga" = "xyes"; then ! AC_DEFINE(HAVE_X11_EXTENSIONS_XF86DGA, 1, ! [Defined if you have X11 XF86DGA extension]) ! HAVE_X11_EXTENSIONS_XF86DGA=1 ! fi ! ! # ---------------------------------------------------------------------- ! AC_ARG_ENABLE(x11-xvlib, ! [ --enable-x11-xvlib Enable X11 XVlib Extension [default=yes]], ! , enable_x11_xvlib=yes) ! ! AC_CACHE_CHECK([for X11 XVlib extension], ! ac_cv_x11_extensions_xvlib, ! [ ! AC_TRY_COMPILE( ! [ ! #include <stdio.h> ! #include <stdlib.h> ! #include <X11/Xlib.h> ! #include <X11/Xutil.h> ! #include <X11/Xatom.h> ! #include <X11/keysym.h> ! #include <X11/extensions/Xvlib.h> ! ], ! [ ! unsigned int xv_version[5] = {0,0,0,0,0}; ! /* We don't need to open the display, we just need this to compile */ ! Display *display = NULL; ! ! printf("Querying Xv\n"); ! if (XvQueryExtension(display, ! &(xv_version[0]), ! &(xv_version[1]), ! &(xv_version[2]), ! &(xv_version[3]), ! &(xv_version[4])) != Success) ! { ! printf("Xv not supported.\n"); ! ! return -1; ! } ! else ! { ! printf("Xv v%u.%u\n", ! xv_version[0], ! xv_version[1]); ! ! return 0; ! } ! ] ! , ! ac_cv_x11_extensions_xvlib=yes, ! ac_cv_x11_extensions_xvlib=no ! ) ! ] ! ) ! if test x"$ac_cv_x11_extensions_xvlib" = "xyes" -a \ ! x"$enable_x11_xvlib" = "xyes"; then ! AC_DEFINE(HAVE_X11_EXTENSIONS_XVLIB, 1, ! [Defined if you have X11 XVlib extension ]) ! HAVE_X11_EXTENSIONS_XVLIB=1 ! fi ! ! # ---------------------------------------------------------------------- ! AC_ARG_ENABLE(x11-xf86vmode, ! [ --enable-x11-xf86vmode Enable X11 XF86VMODE Extension [default=yes]], ! , enable_x11_xf86vmode=yes) ! ! AC_CACHE_CHECK([for X11 XF86VMODE extension], ! ac_cv_x11_extensions_xf86vmode, ! [ ! AC_TRY_COMPILE( ! [ ! #include <stdio.h> ! #include <stdlib.h> ! #include <X11/Xlib.h> ! #include <X11/Xutil.h> ! #include <X11/Xatom.h> ! #include <X11/keysym.h> ! #include <X11/extensions/xf86vmode.h> ! ], ! [ ! int xf86vm_version[2] = {0,0}; ! /* We don't need to open the display, we just need this to compile */ ! Display *display = NULL; ! ! printf("Querying XF86VidMode\n"); ! if (XF86VidModeQueryVersion(display, ! &(xf86vm_version[0]), ! &(xf86vm_version[1])) == False) ! { ! printf("XF86VidMode not supported.\n"); ! ! return -1; ! } ! else ! { ! printf("XF86VidMode v%d.%d\n", ! xf86vm_version[0], ! xf86vm_version[1]); ! ! return 0; ! } ! ], ! ac_cv_x11_extensions_xf86vmode=yes, ! ac_cv_x11_extensions_xf86vmode=no ! ) ! ] ! ) ! ! if test x"$ac_cv_x11_extensions_xf86vmode" = "xyes" -a \ ! x"$enable_x11_xf86vmode" = "xyes"; then ! AC_DEFINE(HAVE_X11_EXTENSIONS_XF86VMODE, 1, ! [Defined if you have X11 XF86VMODE Extension ]) ! HAVE_X11_EXTENSIONS_XF86VMODE=1 ! fi ! ! ! #------------------------------------------------------------------------- ! # Checks for GDI support ! #------------------------------------------------------------------------- ! # Defines: GDI_CFLAGS, GDI_LIBS, USE_GDI, ! # PH_USE_GDI, PH_HAVE_GDI, GDIDISPLAY_LIB #------------------------------------------------------------------------- ! AC_ARG_ENABLE(gdi, ! [ --enable-gdi Enable Windows GDI [default=yes]], ! , enable_gdi=yes) ! ! AC_CHECK_HEADERS([windows.h],[HAVE_WINDOWS_H=1]) ! ! if test x$HAVE_WINDOWS_H = "x1"; then ! ac_gdi_save_CFLAGS=$CFLAGS ! ac_gdi_save_CXXFLAGS=$CXXFLAGS ! ac_gdi_save_LDFLAGS=$LDFLAGS ! ! CFLAGS="$CFLAGS -I/usr/include/w32api" ! CXXFLAGS="$CXXFLAGS -I/usr/include/w32api" ! LDFLAGS="$LDFLAGS -luser32 -gdi32" ! ! AC_CACHE_CHECK([for GDI], ! ac_cv_gdi, ! [ ! AC_TRY_COMPILE( ! [ ! /* Include files */ ! #include <stdio.h> ! #include <stdlib.h> ! #include <windows.h> ! ], ! [ ! /* Main code */ ! HMODULE hMod = GetModulesHandle(NULL); ! HINSTANCE hInstance = (HINSTANCE)hMod; ! MSG msg; ! HWND hWnd = CreateWindow("myClassName", ! "myWindowsName", ! WS_OVERLAPPEDWINDOW, ! CW_USEDEFAULT, ! 0, ! CW_USEDEFAULT, ! 0, ! NULL, ! NULL, ! hInstance, ! NULL); ! ShowWindow(hWnd,SW_SHOW); ! while (GetMessage(&msg,hWnd,0,0)) ! { ! TranslateMessage(&msg); ! DispatchMessage(&msg); ! } ! ShowWindow(hWnd,SW_HIDE); ! ], ! [ac_cv_gdi=yes], ! [ac_cv_gdi=no] ! ) ! ] ! ) ! CFLAGS=$ac_gdi_save_CFLAGS ! CXXFLAGS=$ac_gdi_save_CXXFLAGS ! LDFLAGS=$ac_gdi_save_LDFLAGS - if test x$ac_cv_gdi = "xyes"; then - GDI_CFLAGS="-I/usr/include/w32api" - GDI_CXXFLAGS="-I/usr/include/w32api" - GDI_LDFLAGS="-luser32 -lgdi32" - USE_GDI=yes - else - GDI_CFLAGS= - GDI_CXXFLAGS= - GDI_LDFLAGS= - USE_GDI=no - fi - fi - AC_SUBST([GDI_CFLAGS]) - AC_SUBST([GDI_CXXFLAGS]) - AC_SUBST([GDI_LDFLAGS]) - AC_SUBST([USE_GDI]) - #------------------------------------------------------------------------- # Checks for SDL Library & Headers #------------------------------------------------------------------------- # Defines: SDL_CFLAGS, SDL_LIBS, USE_SDL - # PH_USE_SDL, PH_HAVE_SDL, SDLDISPLAY_LIB #------------------------------------------------------------------------- AM_PATH_SDL($MIN_SDL_VERSION, --- 228,241 ---- #------------------------------------------------------------------------- ! # Checks for V4L,X11,GDI support #------------------------------------------------------------------------- ! AC_PH_V4L_DEVEL() ! AC_PH_X11_DEVEL() ! AC_PH_GDI_DEVEL() #------------------------------------------------------------------------- # Checks for SDL Library & Headers #------------------------------------------------------------------------- # Defines: SDL_CFLAGS, SDL_LIBS, USE_SDL #------------------------------------------------------------------------- AM_PATH_SDL($MIN_SDL_VERSION, *************** *** 657,662 **** # Checks for FLTK Library & Headers #------------------------------------------------------------------------- ! # Defines: FLTK_CFLAGS, FLTK_CXXFLAGS, FLTK_LIBS, USE_FLTK, ! # PH_USE_FLTK, PH_HAVE_FLTK, FLTKDISPLAY_LIB #------------------------------------------------------------------------- # TODO: --- 253,257 ---- # Checks for FLTK Library & Headers #------------------------------------------------------------------------- ! # Defines: FLTK_CFLAGS, FLTK_CXXFLAGS, FLTK_LIBS, USE_FLTK #------------------------------------------------------------------------- # TODO: *************** *** 684,689 **** # HAVE_SYS_SOCKET_H #------------------------------------------------------------------------- ! PH_ARG_WITH(netdisplay,yes, ! Do not try to compile NetDisplay) AC_CHECK_HEADERS([arpa/inet.h], [HAVE_ARPA_INET_H=1]) --- 279,283 ---- # HAVE_SYS_SOCKET_H #------------------------------------------------------------------------- ! PH_ARG_WITH(netdisplay,yes, compile NetDisplay sources ) AC_CHECK_HEADERS([arpa/inet.h], [HAVE_ARPA_INET_H=1]) *************** *** 693,696 **** --- 287,293 ---- #------------------------------------------------------------------------- + AC_PH_JRTPLIB_DEVEL() + + #------------------------------------------------------------------------- # Checks for Java Library & Headers #------------------------------------------------------------------------- *************** *** 699,703 **** # if we can't find JAVAC; then there's no use trying to work with JAVA AC_ARG_ENABLE(java, ! [ --enable-java Compile JAVA modules; Still under development], , enable_java=no) if test x$enable_java != xno -a x$enable_java != x; then --- 296,300 ---- # if we can't find JAVAC; then there's no use trying to work with JAVA AC_ARG_ENABLE(java, ! [ --enable-java compile JAVA modules (Still under development)], , enable_java=no) if test x$enable_java != xno -a x$enable_java != x; then *************** *** 713,716 **** --- 310,314 ---- fi + #------------------------------------------------------------------------- AM_CONDITIONAL(PH_USE_JAVA, [test x$enable_java != xno -a \ *************** *** 727,732 **** # PYTHON_LDFLAGS, HAVE_PYTHON_LIB, HAVE_PYTHON_INCLUDES #------------------------------------------------------------------------- ! PH_ARG_WITH(python,yes, ! Do not try to compile sources that depend on Python) AM_PATH_PYTHON([2], [HAVE_PYTHON2=1], --- 325,329 ---- # PYTHON_LDFLAGS, HAVE_PYTHON_LIB, HAVE_PYTHON_INCLUDES #------------------------------------------------------------------------- ! PH_ARG_WITH(python,yes, compile targets that depend on Python) AM_PATH_PYTHON([2], [HAVE_PYTHON2=1], *************** *** 773,778 **** # Checks for OpenCV Library & Headers #------------------------------------------------------------------------- ! # Returns: OPENCV_CFLAGS, OPENCV_CXXFLAGS, OPENCV_LIBS, USE_OPENCV, ! # PH_USE_OPENCV, PH_HAVE_OPENCV #------------------------------------------------------------------------- AM_PATH_OPENCV($MIN_OPENCV_VERSION, --- 370,374 ---- # Checks for OpenCV Library & Headers #------------------------------------------------------------------------- ! # Returns: OPENCV_CFLAGS, OPENCV_CXXFLAGS, OPENCV_LIBS, USE_OPENCV #------------------------------------------------------------------------- AM_PATH_OPENCV($MIN_OPENCV_VERSION, *************** *** 894,939 **** AC_C_VOLATILE ! #------------------------------------------------------------------------- ! # Check for variadic macros; Modified from source ! #------------------------------------------------------------------------- ! # http://www.micq.org/source/micq-cvs-unstable/configure.ac ! #------------------------------------------------------------------------- ! AC_CACHE_CHECK(checking for variadic macro support, ac_cv_macro_variadic, ! [AC_LINK_IFELSE( ! [ ! AC_LANG_PROGRAM( ! [[#include <stdio.h>]], ! [[#define variadic(a,...) printf (a "bla" , ## __VA_ARGS__) ]], ! [[ ! /* note space before comma to avoid gcc-2.05 bug: '"bla" ,' */ ! variadic ("bla\n"); ! variadic ("bla%sbla\n", "bla"); ! ]]) ! ], ! [ac_cv_macro_variadic=yes], ! [ac_cv_macro_variadic=no])]) ! ! if test "x$ac_cv_macro_variadic" = xyes; then ! HAVE_VARIADIC_MACROS=1 ! AC_DEFINE(HAVE_VARIADIC_MACROS,1, ! [have support for advanced variadic macros]) ! else ! AC_MSG_ERROR([[ ! ! *** Variadic macros are required for Phission. ! *** ! *** Try: ! *** CC=xxxx CXX=xxxx ./configure ! *** ! *** Where 'xxxx' is the path to a compiler supporting variadic macros. ! *** ! *** gcc 2.95 doesn't seem to support them so try "which gcc" and ! *** "locate gcc | grep bin" to see if you are possibly using ! *** an older version of gcc. Adjust your PATH environmental ! *** variable so the directory with the approriate gcc appears before ! *** the other gcc. ! ]]) ! fi ! #----------------------------------------------------------------------------- --- 490,494 ---- AC_C_VOLATILE ! AC_PH_VARIADIC_MACRO() #----------------------------------------------------------------------------- *************** *** 1212,1215 **** --- 767,771 ---- fi + #------------------------------------------------------------------------- # Checks for GDI Library and Headers *************** *** 1221,1225 **** AC_DEFINE(PH_HAVE_GDI,1, ! [Define whether GDI can/will be used by Phission.] ) GDIDISPLAY_LIB="./display/gdi/libgdidisplay.la" --- 777,781 ---- AC_DEFINE(PH_HAVE_GDI,1, ! [Define whether GDI can/will be used.] ) GDIDISPLAY_LIB="./display/gdi/libgdidisplay.la" *************** *** 1349,1352 **** --- 905,932 ---- #------------------------------------------------------------------------- + # Defines: PH_USE_JRTPLIB, PH_USE_JTHREAD, PH_HAVE_JTHREAD, + # PH_HAVE_JRTPLIB + #------------------------------------------------------------------------- + + AM_CONDITIONAL(PH_USE_JRTPLIB,test x$USE_JRTPLIB = xyes) + AM_CONDITIONAL(PH_USE_JTHREAD,test x$USE_JTHREAD = xyes) + + if test "x$USE_JRTPLIB" = "xyes"; then + AC_MSG_NOTICE([ Using JRTPLIB: yes]) + AC_DEFINE(PH_HAVE_JRTPLIB,1, + [Define whether JRTPLIB will be used.] ) + else + AC_MSG_NOTICE([ Using JRTPLIB: no]) + fi + + if test "x$USE_JTHREAD" = "xyes"; then + AC_MSG_NOTICE([ Using JTHREAD: yes]) + AC_DEFINE(PH_HAVE_JTHREAD,1, + [Define whether JTHREAD will be used.] ) + else + AC_MSG_NOTICE([ Using JTHREAD: no]) + fi + + #------------------------------------------------------------------------- # USE_ SWIG,Java,Python Variables #------------------------------------------------------------------------- |