Fixing build with as-needed https://bugs.gentoo.org/248556 --- a/configure.in +++ b/configure.in @@ -56,15 +56,10 @@ AC_PATH_X AC_PATH_XTRA -CFLAGS="$CFLAGS $X_CFLAGS" -CXXFLAGS="$CXXFLAGS $X_CFLAGS" -LDFLAGS="$LDFLAGS $X_LIBS $X_PRE_LIBS" DATADIR=$datadir 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,5 +1,4 @@ -CPPFLAGS = @CPPFLAGS@ \ - -DDEFAULT_CONF=\"$(datadir)/bbtools/bbweather.conf\" \ +AM_CPPFLAGS = -DDEFAULT_CONF=\"$(datadir)/bbtools/bbweather.conf\" \ -DDEFAULT_NOBB=\"$(datadir)/bbtools/bbweather.nobb\" @@ -13,4 +12,5 @@ Basewindow.cpp Basewindow.h \ blackboxstyle.h EXTRA_DIST = BUGS TODO -bbweather_LDADD = @X_LIBS@ +bbweather_LDADD = @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ +bbweather_CFLAGS = @X_PRE_CFLAGS@ @X_CFLAGS@ @X_EXTRA_CFLAGS@