From 4d1267314753bf2fd89b40f161128e5871648f80 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sun, 5 Jan 2020 16:20:35 -0700 Subject: [PATCH] configure: detect and use jpeg library --- cde/configure.ac | 8 +++++++- cde/lib/DtHelp/Makefile.am | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index ab74b185..6173479b 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -126,7 +126,7 @@ dnl set CSRG_BASED define for the BSD's if test "$bsd" = "yes" then SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED" - MOTIF_LIB="-L/usr/local/lib -R/usr/local/lib" + MOTIF_LIB="-L/usr/local/lib" MOTIF_INC="-I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/local/include/freetype2" fi @@ -368,6 +368,12 @@ AC_CHECK_LIB(tirpc, svc_register, TIRPCLIB=-ltirpc]) AC_SUBST(TIRPCLIB) +dnl jpeg +AC_CHECK_LIB(jpeg, jpeg_read_header, [JPEGLIB="-ljpeg"], + [AC_MSG_ERROR([libjpeg not found, please install it])], + [$MOTIF_LIB $X_LIBS]) +AC_SUBST(JPEGLIB) + dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering dnl issues XTOOLLIB="" diff --git a/cde/lib/DtHelp/Makefile.am b/cde/lib/DtHelp/Makefile.am index c89a20a3..dc76171d 100644 --- a/cde/lib/DtHelp/Makefile.am +++ b/cde/lib/DtHelp/Makefile.am @@ -13,7 +13,7 @@ libDtHelp_la_CFLAGS = -I./il -I./jpeg -I../DtSvc/DtUtil2 -DDTLIB \ -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' \ @DT_INCDIR@ @DTI_INCDIR@ -libDtHelp_la_LIBADD = -ljpeg il/libil.la +libDtHelp_la_LIBADD = $(JPEGLIB) il/libil.la if SOLARIS libDtHelp_la_CFLAGS += -DICONV_INBUF_CONST=const -DLSB_BIT_ORDER -- 2.25.1