Browse Source

Fix build with gcc-9.

Make sure libraries are mentioned last on the linker's command
line. Do not use LFDLAGS as a substitute for LIBS.

Thanks to Thomas Perret.

Closes #3
master
parent
commit
603af85a12
  1. 14
      configure.ac
  2. 4
      src/Makefile.am

14
configure.ac

@ -19,23 +19,29 @@ ICP_CHECK_NOTCH_FUNCS
dnl Check for Libgcrypt
AM_PATH_LIBGCRYPT([1.6.0],
[CFLAGS="$CFLAGS $LIBGCRYPT_FLAGS"
[CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
LIBS="$LIBS $LIBGCRYPT_LIBS"],
[AC_MSG_ERROR([libgcrypt not found])])
dnl Check for Libgfshare
PKG_CHECK_MODULES([LIBGFSHARE], [libgfshare])
PKG_CHECK_MODULES([LIBGFSHARE], [libgfshare],
[CFLAGS="$CFLAGS $LIBGFSHARE_CFLAGS"
LIBS="$LIBS $LIBGFSHARE_LIBS"])
dnl Check for LibMTP
PKG_CHECK_MODULES([LIBMTP], [libmtp],
[AC_DEFINE([HAVE_LIBMTP], [1], [Define if libmtp is present.])
have_libmtp=yes],
have_libmtp=yes
CFLAGS="$CFLAGS $LIBMTP_CFLAGS"
LIBS="$LIBS $LIBMTP_LIBS"],
[have_libmtp=no])
dnl Check for GIO
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.22],
[AC_DEFINE([HAVE_GIO], [1], [Define if gio-2.0 is present.])
have_gio=yes],
have_gio=yes
CFLAGS="$CFLAGS $GIO_CFLAGS"
LIBS="$LIBS $GIO_LIBS"],
[have_gio=no])
dnl Set max size for secret

4
src/Makefile.am

@ -12,8 +12,8 @@ gfsec_use_SOURCES = gfsec-use.c $(common_sources)
gfsec_split_SOURCES = gfsec-split.c $(common_sources)
AM_CPPFLAGS = -I$(top_srcdir)/lib $(LIBGFSHARE_CFLAGS) $(LIBMTP_CFLAGS) $(GIO_CFLAGS)
AM_LDFLAGS = -L$(top_builddir)/lib $(LIBGFSHARE_LIBS) $(LIBMTP_LIBS) $(GIO_LIBS)
AM_CPPFLAGS = -I$(top_srcdir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
LDADD = -lgfsecret
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

Loading…
Cancel
Save