diff --git a/configure.ac b/configure.ac index 38567d9..958d30b 100644 --- a/configure.ac +++ b/configure.ac @@ -32,21 +32,14 @@ AC_PATH_X PKG_CHECK_MODULES([OpenCV], [opencv >= 2.0.0], [use_opencv2=true], [use_opencv1=true]) #Let doxygen know where our headers are at AC_SUBST(CV_VERSION, "opencv2") -AC_SUBST(CV_HEADERS_1, ["/* OpenCV2 includes - some filenames are different"]) -AC_SUBST(CV_HEADERS_2, [" * from the OpenCV1 counterparts */"]) -AC_SUBST(CV_HEADERS_3, ["include "]) -AC_SUBST(CV_HEADERS_4, ["include "]) -AC_SUBST(CV_HEADERS_5, ["include "]) +AC_SUBST_FILE([cv_headers]) +cv_headers=$srcdir/include/opencv2_includes 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]) #Update doxygen on where our headers are at AC_SUBST(CV_VERSION, "opencv1") - AC_SUBST(CV_HEADERS_1, ["/* OpenCV includes */"]) - AC_SUBST(CV_HEADERS_2, [" " ]) - AC_SUBST(CV_HEADERS_3, ["include "]) - AC_SUBST(CV_HEADERS_4, ["include "]) - AC_SUBST(CV_HEADERS_5, ["define NEVER_USED"]) + cv_headers=$srcdir/include/opencv1_includes fi AC_SUBST(CV_CFLAGS, [`pkg-config --cflags opencv`]) AC_SUBST(CV_LIBS, [`pkg-config --libs opencv`]) diff --git a/include/libcvautomation/libcvautomation.h.in b/include/libcvautomation/libcvautomation.h.in index dcc7b48..ecbf76e 100644 --- a/include/libcvautomation/libcvautomation.h.in +++ b/include/libcvautomation/libcvautomation.h.in @@ -25,11 +25,7 @@ #include /* Autoconf logic to select the correct OpenCV version */ -@CV_HEADERS_1@ -@CV_HEADERS_2@ -#@CV_HEADERS_3@ -#@CV_HEADERS_4@ -#@CV_HEADERS_5@ +@cv_headers@ /* X11 includes */ #include diff --git a/include/opencv1_includes b/include/opencv1_includes new file mode 100644 index 0000000..dd918e4 --- /dev/null +++ b/include/opencv1_includes @@ -0,0 +1,4 @@ +/* OpenCV includes */ + +#include +#include diff --git a/include/opencv2_includes b/include/opencv2_includes new file mode 100644 index 0000000..51b2add --- /dev/null +++ b/include/opencv2_includes @@ -0,0 +1,5 @@ +/* OpenCV2 includes - some filenames are different + * from the OpenCV1 counterparts */ +#include +#include +#include