Sfoglia il codice sorgente

* configure.ac: fix the OpenCV detection by using pkg-config.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2628 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 anni fa
parent
commit
732f6b2335
2 ha cambiato i file con 4 aggiunte e 12 eliminazioni
  1. +2
    -10
      configure.ac
  2. +2
    -2
      pipi/Makefile.am

+ 2
- 10
configure.ac Vedi File

@@ -76,15 +76,8 @@ AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")


# Use OpenCV? # Use OpenCV?
ac_cv_my_have_opencv="no" ac_cv_my_have_opencv="no"
save_CPPFLAGS="${CPPFLAGS}"
AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
if test "${OPENCV_CONFIG}" != "no"; then
CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
fi
AC_CHECK_HEADERS(cv.h,
[ac_cv_my_have_opencv="yes"],
[ac_cv_my_have_opencv="no"])
CPPFLAGS="${save_CPPFLAGS}"
OPENCV="no"
PKG_CHECK_MODULES(OPENCV, opencv, [ac_cv_my_have_opencv="yes"])
if test "${ac_cv_my_have_opencv}" != "no"; then if test "${ac_cv_my_have_opencv}" != "no"; then
AC_DEFINE(USE_OPENCV, 1, Define to 1 to use OpenCV) AC_DEFINE(USE_OPENCV, 1, Define to 1 to use OpenCV)
fi fi
@@ -94,7 +87,6 @@ AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
ac_cv_my_have_imlib2="no" ac_cv_my_have_imlib2="no"
IMLIB2="no" IMLIB2="no"
PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"]) PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"])
AC_MSG_RESULT($ac_cv_my_have_imlib2)
if test "${ac_cv_my_have_imlib2}" != "no"; then if test "${ac_cv_my_have_imlib2}" != "no"; then
AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2) AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
fi fi


+ 2
- 2
pipi/Makefile.am Vedi File

@@ -46,8 +46,8 @@ codec_sources += codec/imlib.c
endif endif


if USE_OPENCV if USE_OPENCV
codec_cflags += `opencv-config --cflags`
codec_libs += `opencv-config --libs opencv highgui`
codec_cflags += @OPENCV_CFLAGS@
codec_libs += @OPENCV_LIBS@
codec_sources += codec/opencv.c codec_sources += codec/opencv.c
endif endif



Caricamento…
Annulla
Salva