Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No commit message

  • Loading branch information...
commit 7fd4edd2183581f438577be6e11fb3d9cf4e66d6 1 parent fdea022
fukuchi authored
Showing with 7 additions and 49 deletions.
  1. +2 −0  ChangeLog
  2. +2 −2 Makefile.am
  3. +0 −44 acinclude.m4
  4. +3 −3 configure.ac
View
2  ChangeLog
@@ -1,6 +1,8 @@
2006.12.17 Kentaro FUKUCHI <fukuchi@megaui.net>
* qrencode_inner.h, qrencode.c:
- Removed unused member variable "b2" from QRRawCode.
+ * configure.ac, Makefile.am, acinclude.m4:
+ - Better configuration of libpng. (now uses pkg-config correctly)
2006.12.02 Kentaro FUKUCHI <fukuchi@megaui.net>
* Bumped version to 1.0.0.
View
4 Makefile.am
@@ -21,6 +21,6 @@ EXTRA_DIST = libqrencode.pc.in
if BUILD_TOOLS
bin_PROGRAMS = qrencode
-qrencode_SOURCES = qrenc.c
-qrencode_LDADD = -lqrencode -lpng
+qrencode_CFLAGS = $(png_CFLAGS)
+qrencode_LDADD = -lqrencode $(png_LIBS)
endif
View
44 acinclude.m4
@@ -1,44 +0,0 @@
-dnl Test for libpng
-AC_DEFUN([AM_PATH_LIBPNG],
-[
- if test x$with_libpng != xno && test -z "$LIBPNG"; then
- AC_MSG_CHECKING(for libpng12)
- if pkg-config --exists libpng12 ; then
- AC_MSG_RESULT(yes)
- PNG='png'
- PNG_DEP_CFLAGS_PACKAGES=libpng12
- LIBPNG=`pkg-config --libs libpng12`
- else
- AC_MSG_RESULT(no)
- AC_CHECK_LIB(png, png_read_info,
- [AC_CHECK_HEADER(png.h,
- png_ok=yes,
- png_ok=no)],
- AC_MSG_WARN(*** PNG library not found), -lz -lm)
- if test "$png_ok" = yes; then
- AC_MSG_CHECKING([for png_structp in png.h])
- AC_TRY_COMPILE([#include <png.h>],
- [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
- png_ok=yes,
- png_ok=no)
- AC_MSG_RESULT($png_ok)
- if test "$png_ok" = yes; then
- PNG='png'; LIBPNG='-lpng -lz'
- else
- AC_MSG_WARN(*** PNG library is too old)
- fi
- else
- AC_MSG_WARN(*** PNG header file not found)
- fi
- fi
- fi
-
- if test x$with_libpng != xno && test -z "$LIBPNG"; then
- AC_MSG_ERROR([
-*** Checks for PNG library failed. You can build the library without it by
-*** passing --without-tools to configure but utility tools are not to be
-*** built.])
- fi
-
- AC_SUBST(LIBPNG)
-])
View
6 configure.ac
@@ -2,7 +2,7 @@ AC_INIT(QRencode)
MAJOR_VERSION=1
MINOR_VERSION=0
-MICRO_VERSION=0
+MICRO_VERSION=1
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
@@ -24,7 +24,7 @@ AC_HEADER_STDC
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
-
+PKG_PROG_PKG_CONFIG
SDL_REQUIRED_VERSION=1.2.0
AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.]))
@@ -38,7 +38,7 @@ AC_ARG_WITH([tools], [AC_HELP_STRING([--with-tools], [build utility tools [defau
[], [build_tools=yes])
if test x$build_tools = xyes ; then
- AM_PATH_LIBPNG
+ PKG_CHECK_MODULES(png, "libpng12")
fi
AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
Please sign in to comment.
Something went wrong with that request. Please try again.