Fixing build with as-needed https://bugs.gentoo.org/show_bug.cgi?id=248555 --- configure.in +++ configure.in @@ -47,14 +47,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 --- Makefile.am +++ Makefile.am @@ -1,5 +1,4 @@ -CPPFLAGS = @CPPFLAGS@ \ - -DDEFAULT_CONF=\"$(datadir)/bbtools/bbtime.conf\" \ +AM_CPPFLAGS = -DDEFAULT_CONF=\"$(datadir)/bbtools/bbtime.conf\" \ -DDEFAULT_NOBB=\"$(datadir)/bbtools/bbtime.nobb\" @@ -14,4 +13,5 @@ timemenu.cc timemenu.hh \ blackboxstyle.hh EXTRA_DIST = BUGS TODO -bbtime_LDADD = @X_LIBS@ +bbtime_LDADD = @X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ +bbtime_CFLAGS = @X_PRE_CFLAGS@ @X_CGLAGS@ @X_EXTRA_CFLAGS@