Fixing build with as-needed https://bugs.gentoo.org/show_bug.cgi?id=248552 --- a/configure.in +++ b/configure.in @@ -86,14 +86,9 @@ AC_PATH_X AC_PATH_XTRA -CFLAGS="$CFLAGS $X_CFLAGS" -CXXFLAGS="$CXXFLAGS $X_CFLAGS" -LDFLAGS="$LDFLAGS $X_LIBS $X_PRE_LIBS" dnl Checks for X libraries. -AC_CHECK_LIB(X11, XOpenDisplay, LDFLAGS="$LDFLAGS -lX11", - AC_MSG_ERROR(XOpenDisplay not found in -lX11)) - -LDFLAGS="$LDFLAGS $X_EXTRA_LIBS" +AC_CHECK_LIB([X11], [XOpenDisplay], , + AC_MSG_ERROR(XOpenDisplay not found in -lX11),) dnl Checks for header files. AC_HEADER_STDC --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -CPPFLAGS = @CPPFLAGS@ @INTERLACE@ @ISDN@\ +AM_CPPFLAGS = @INTERLACE@ @ISDN@\ -DGLOBAL_BB=\"$(datadir)/bbtools/bbppp.bb\" \ -DGLOBAL_NOBB=\"$(datadir)/bbtools/bbppp.nobb\" @@ -16,4 +16,5 @@ Basewindow.cc Basewindow.hh \ blackboxstyle.hh EXTRA_DIST = BUGS TODO -bbppp_LDADD = @X_LIBS@ +bbppp_LDADD = @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ +bbppp_CFLAGS = @X_PRE_CFLAGS@ @X_CFLAGS@ @X_EXTRA_CFLAGS@