1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

configure: rework the way TIRPC is detected and handled

Previously we would detect whether TIRPC is installed or not, and set
TIRPCINC to the include directory with the -DOPT_TIRPC macro defined.
Then, pretty much every Makefile.am needs to be sure that $(TIRPCINC) is
specified in the cpp/c/cxx flags.

Since we can never be sure that an RPC header file might be indirectly
included, a better approach is to simply add TIRPCINC to the global
list of CXXFLAGS and CFLAGS in configure.ac for everybody.  This way,
it is always specified properly on tirpc systems, and we don't need to
always add it to every individual Makefile.am since everyone will get
it by default.

TIRPCLIB is still marked as a dep in libtt, so as long as libtt is
linked, you should automatically get the tirpc library too.  This is
still unchanged.
This commit is contained in:
Jon Trulson 2019-11-20 18:26:59 -07:00
parent 10eb9a6975
commit 0f1223a07e

View file

@ -265,10 +265,15 @@ AC_CHECK_HEADERS([locale.h])
dnl libraries
AC_CHECK_LIB(m, cosf)
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(tirpc, main, [TIRPCINC="-DOPT_TIRPC -I/usr/include/tirpc"; TIRPCLIB=-ltirpc])
AC_SUBST(TIRPCINC)
AC_CHECK_LIB(Xinerama, XineramaQueryScreens, ,
[AC_MSG_ERROR([libXinerama not found])])
dnl Special check for tirpc...
AC_CHECK_LIB(tirpc, svc_register,
[CFLAGS="${CFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
CXXFLAGS="${CXXFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
TIRPCLIB=-ltirpc])
AC_SUBST(TIRPCLIB)
AC_CHECK_LIB(Xinerama, XineramaQueryScreens, ,[AC_MSG_ERROR([libXinerama not found])])
dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
dnl issues