Commit fc5a368f authored by npzacs's avatar npzacs
Browse files

Fix linking against gpg-error

parent bf5cf76f
......@@ -136,8 +136,28 @@ else
AC_SUBST(LIBGCRYPT_LIBS)
fi
AC_FUNC_STRERROR_R
AC_CHECK_LIB([gpg-error], [gpg_strerror_r])
# use re-entrant version of gcrypt_error() from gpg-error
AC_ARG_WITH(gpg-error-prefix,
AC_HELP_STRING([--with-gpg-error-prefix=PFX],
[prefix where gpg-error is installed (optional)]),
gpg_error_config_prefix="$withval", gpg_error_config_prefix="")
if test x$gpg_error_config_prefix != x ; then
if test x${GPG_ERROR_CONFIG+set} != xset ; then
GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
fi
fi
AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
if test x"$GPG_ERROR_CONFIG" = xno; then
AC_MSG_ERROR([gpg-error not found on system])
else
GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
AC_SUBST(GPG_ERROR_CFLAGS)
AC_SUBST(GPG_ERROR_LIBS)
fi
CC_CHECK_CFLAGS_APPEND([-Wall -Wdisabled-optimization -Wpointer-arith ]dnl
[-Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef ]dnl
......
SET_FEATURES = @SET_FEATURES@
SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibaacs
AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBGCRYPT_CFLAGS)
AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
AM_YFLAGS = -d -p libaacs_yy
lib_LTLIBRARIES = libaacs.la
......@@ -54,7 +54,7 @@ pkginclude_HEADERS = \
libaacs/aacs-version.h
libaacs_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO)
libaacs_la_LIBADD = $(LIBGCRYPT_LIBS)
libaacs_la_LIBADD = $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libaacs.pc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment