Browse Source

Detect Windows GDI at configuration time.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2839 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
89d3be6048
3 changed files with 25 additions and 0 deletions
  1. +21
    -0
      configure.ac
  2. +4
    -0
      pipi/Makefile.am
  3. +0
    -0
      pipi/codec/gdi.c

+ 21
- 0
configure.ac View File

@@ -25,6 +25,16 @@ AC_LIBTOOL_CXX
AC_C_CONST
AC_C_INLINE

dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
dnl now otherwise it might be set in an obscure if statement. Same thing for
dnl PKG_PROG_PKG_CONFIG which needs to be called first.
AC_EGREP_CPP(yes, foo)
PKG_PROG_PKG_CONFIG()
m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
export PKG_CONFIG_LIBDIR=/dev/null
fi

AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h)

ac_cv_have_getopt_long="no"
@@ -92,6 +102,17 @@ if test "${ac_cv_my_have_imlib2}" != "no"; then
fi
AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")

# Use Windows GDI?
ac_cv_my_have_gdi="no"
GDI="no"
AC_CHECK_HEADERS(windows.h,
[ac_cv_my_have_gdi="yes"],
[ac_cv_my_have_gdi="no"])
if test "${ac_cv_my_have_gdi}" != "no"; then
AC_DEFINE(USE_GDI, 1, Define to 1 to use GDI)
fi
AM_CONDITIONAL(USE_GDI, test "${ac_cv_my_have_gdi}" = "yes")

if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then
AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
fi


+ 4
- 0
pipi/Makefile.am View File

@@ -102,3 +102,7 @@ codec_libs += @OPENCV_LIBS@
codec_sources += codec/opencv.c
endif

if USE_GDI
codec_sources += codec/gdi.c
endif


+ 0
- 0
pipi/codec/gdi.c View File


Loading…
Cancel
Save