2012-06-22 13:22:16 -04:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2012-06-22 16:15:59 -04:00
|
|
|
AC_PREREQ(2.59)
|
2012-07-12 15:34:01 -04:00
|
|
|
AC_INIT(libcvautomation, 1.1, bspeice@uncc.edu)
|
2012-07-11 15:06:57 -04:00
|
|
|
#AC_CONFIG_HEADERS([config.h])
|
2012-06-22 13:22:16 -04:00
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
|
|
|
|
2012-06-26 16:36:13 -04:00
|
|
|
#path intelc110 /opt/coe/intelc110
|
2012-06-22 13:22:16 -04:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
# Checks for libraries.
|
|
|
|
#AC_CHECK_LIB(cv, cvMatchTemplate)
|
|
|
|
#AC_CHECK_LIB(cv, cvMinMaxLoc)
|
|
|
|
#AC_CHECK_LIB(X11, XGetImage)
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_PATH_X
|
|
|
|
#Headers needed for libcvautomation
|
|
|
|
#AC_CHECK_HEADER(stdio.h)
|
|
|
|
#AC_CHECK_HEADER(opencv/cv.h)
|
|
|
|
#AC_CHECK_HEADER(opencv/highgui.h)
|
|
|
|
#AC_CHECK_HEADER(X11/Xlib.h)
|
|
|
|
#AC_CHECK_HEADER(X11/Xutil.h)
|
2012-06-22 20:06:28 -04:00
|
|
|
|
|
|
|
#Configure OpenCV - version 2+ breaks a lot of things
|
|
|
|
PKG_CHECK_MODULES([OpenCV], [opencv >= 2.0.0], [use_opencv2=true], [use_opencv1=true])
|
2012-06-22 23:36:21 -04:00
|
|
|
AM_CONDITIONAL(USEOPENCV2, [test "$use_opencv2" != ""])
|
2012-07-11 14:34:26 -04:00
|
|
|
#Let doxygen know where our headers are at
|
2012-07-11 15:59:06 -04:00
|
|
|
AC_SUBST(INPUT_PATH, "../include/opencv2 ../examples")
|
2012-06-22 20:06:28 -04:00
|
|
|
if test "$use_opencv1" != ""; then
|
|
|
|
echo "could not find OpenCV version 2.0.0 or higher, checking for 1.0.0 or higher..."
|
|
|
|
PKG_CHECK_MODULES([OpenCV], [opencv >= 1.0.0])
|
2012-07-11 14:34:26 -04:00
|
|
|
#Update doxygen on where our headers are at
|
2012-07-11 15:59:06 -04:00
|
|
|
AC_SUBST(INPUT_PATH, "../include/opencv1 ../examples")
|
2012-06-22 20:06:28 -04:00
|
|
|
fi
|
|
|
|
|
2012-06-22 13:22:16 -04:00
|
|
|
PKG_CHECK_MODULES([X11], [x11 >= 1.0.3])
|
2012-06-26 16:36:13 -04:00
|
|
|
PKG_CHECK_MODULES([XTest], [xtst >= 0.21])
|
2012-06-22 13:22:16 -04:00
|
|
|
|
2012-07-11 14:34:26 -04:00
|
|
|
AC_ARG_WITH(examples, [ --with-examples build example programs @<:@default=yes@:>@])
|
2012-06-22 13:22:16 -04:00
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_EXAMPLES, [test "$with_examples" != "no"])
|
|
|
|
if test "$with_examples" != "no"; then
|
|
|
|
#Headers needed for cva-match
|
2012-06-25 16:35:50 -04:00
|
|
|
AC_CHECK_HEADERS([limits.h stdlib.h unistd.h])
|
2012-06-22 13:22:16 -04:00
|
|
|
fi
|
|
|
|
|
2012-07-11 14:34:26 -04:00
|
|
|
# Check for doxygen
|
|
|
|
AC_ARG_WITH(docs, [ --with-documentation build documentation for libcvautomation @<:@default=yes@:>@])
|
|
|
|
AC_ARG_ENABLE(man, [ --enable-man enable building the 'man' pages for libcvautomation @<:@default=enable@:>@])
|
|
|
|
AC_ARG_ENABLE(tex, [ --enable-tex enable building the 'latex' pages for libcvautomation @<:@default=enable@:>@])
|
|
|
|
if test "$with_docs" != "no"; then
|
2012-07-12 10:06:08 -04:00
|
|
|
AC_CHECK_PROGS([Doxygen], [doxygen], [true])
|
2012-07-11 14:34:26 -04:00
|
|
|
if test -z "$Doxygen"; then
|
|
|
|
AC_MSG_WARN([Doxygen not found - continuing without building documentation.])
|
2012-07-12 10:06:08 -04:00
|
|
|
else
|
|
|
|
AM_CONDITIONAL(BUILD_DOXYGEN, [test "$with_docs" != "no"])
|
|
|
|
AC_CONFIG_FILES([docs/Doxyfile])
|
2012-07-11 14:34:26 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#Check if we should generate man pages
|
|
|
|
if test "$enable_man" != "no"; then
|
|
|
|
AC_SUBST(ENABLE_MAN, YES)
|
|
|
|
AM_CONDITIONAL(BUILD_MAN, [test "$enable_man" != "no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
#Check if we should build Tex pages
|
|
|
|
if test "$enable_tex" != "no"; then
|
|
|
|
AC_SUBST(ENABLE_TEX, YES)
|
|
|
|
AM_CONDITIONAL(BUILD_TEX, [test "$enable_tex" != "no"])
|
|
|
|
fi
|
|
|
|
fi
|
2012-06-22 13:22:16 -04:00
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
|
2012-07-11 14:34:26 -04:00
|
|
|
AC_OUTPUT([Makefile] [libcvautomation/Makefile] [examples/Makefile] [docs/Makefile])
|