mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
freetype: redo the way we detect and use
We (configure) relies on freetype-config existing and telling us what the proper includes and libs are.
This commit is contained in:
parent
4d12673147
commit
7f4889f348
4 changed files with 54 additions and 35 deletions
|
@ -65,9 +65,10 @@ OSMAJORVERSION=4
|
||||||
OSMINORVERSION=15
|
OSMINORVERSION=15
|
||||||
|
|
||||||
dnl locations of libs/includes if not in 'standard' places like on
|
dnl locations of libs/includes if not in 'standard' places like on
|
||||||
dnl linux
|
dnl linux (/usr/...). We build these up based on where X11 is, and
|
||||||
MOTIF_LIB=""
|
dnl other things as we go along.
|
||||||
MOTIF_INC=""
|
EXTRA_LIBS=""
|
||||||
|
EXTRA_INCS=""
|
||||||
|
|
||||||
case "${host_os}" in
|
case "${host_os}" in
|
||||||
linux*)
|
linux*)
|
||||||
|
@ -122,12 +123,13 @@ AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
|
||||||
dnl Add osmajor/minor version to cppflags.
|
dnl Add osmajor/minor version to cppflags.
|
||||||
OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION"
|
OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION"
|
||||||
|
|
||||||
dnl set CSRG_BASED define for the BSD's
|
dnl set CSRG_BASED define for the BSD's. Also, they use /usr/local
|
||||||
|
dnl for a lot of things, so add that to the INCS and LIBS
|
||||||
if test "$bsd" = "yes"
|
if test "$bsd" = "yes"
|
||||||
then
|
then
|
||||||
SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED"
|
SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED"
|
||||||
MOTIF_LIB="-L/usr/local/lib"
|
EXTRA_INCS="-I/usr/local/include ${EXTRA_INCS}"
|
||||||
MOTIF_INC="-I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/local/include/freetype2"
|
EXTRA_LIBS="-L/usr/local/lib ${EXTRA_LIBS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
is_x86_64=no
|
is_x86_64=no
|
||||||
|
@ -294,6 +296,10 @@ AC_PROG_CC_C99
|
||||||
AC_PATH_X
|
AC_PATH_X
|
||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
|
|
||||||
|
dnl Add X11 goodies here
|
||||||
|
EXTRA_LIBS="${X_LIBS} ${EXTRA_LIBS}"
|
||||||
|
EXTRA_INCS="${X_CFLAGS} ${EXTRA_INCS}"
|
||||||
|
|
||||||
AC_FUNC_FORK
|
AC_FUNC_FORK
|
||||||
|
|
||||||
dnl programs with full paths
|
dnl programs with full paths
|
||||||
|
@ -371,21 +377,39 @@ AC_SUBST(TIRPCLIB)
|
||||||
dnl jpeg
|
dnl jpeg
|
||||||
AC_CHECK_LIB(jpeg, jpeg_read_header, [JPEGLIB="-ljpeg"],
|
AC_CHECK_LIB(jpeg, jpeg_read_header, [JPEGLIB="-ljpeg"],
|
||||||
[AC_MSG_ERROR([libjpeg not found, please install it])],
|
[AC_MSG_ERROR([libjpeg not found, please install it])],
|
||||||
[$MOTIF_LIB $X_LIBS])
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
AC_SUBST(JPEGLIB)
|
AC_SUBST(JPEGLIB)
|
||||||
|
|
||||||
dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
|
dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
|
||||||
dnl issues
|
dnl issues
|
||||||
XTOOLLIB=""
|
XTOOLLIB=""
|
||||||
AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"], , $X_LIBS)
|
AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"], ,
|
||||||
AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"], , $X_LIBS)
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"], , $X_LIBS)
|
AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"], ,
|
||||||
AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"], , $X_LIBS)
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"], , $X_LIBS)
|
AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"], ,
|
||||||
AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"], , [$MOTIF_LIB $X_LIBS])
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
XTOOLLIB="${X_LIBS} ${MOTIF_LIB} ${X_EXTRA_LIBS} ${X_PRE_LIBS} ${XTOOLLIB}"
|
AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"], ,
|
||||||
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
|
AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"], ,
|
||||||
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
|
AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"], ,
|
||||||
|
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||||
|
|
||||||
|
XTOOLLIB="${EXTRA_INCS} ${EXTRA_LIBS} ${X_EXTRA_LIBS} ${XTOOLLIB}"
|
||||||
AC_SUBST([XTOOLLIB])
|
AC_SUBST([XTOOLLIB])
|
||||||
|
|
||||||
|
dnl Check for freetype libraries/headers
|
||||||
|
AC_CHECK_TOOLS([FREETYPE_CONFIG], [freetype-config])
|
||||||
|
if test -z "$FREETYPE_CONFIG"; then
|
||||||
|
AC_MSG_ERROR([Missing freetype-config. Install freetype development headers and library.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
|
||||||
|
AC_SUBST(FREETYPE_CFLAGS)
|
||||||
|
FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
|
||||||
|
AC_SUBST(FREETYPE_LIBS)
|
||||||
|
|
||||||
dnl check MISSING_PROGS - error out here if there's stuff in it.
|
dnl check MISSING_PROGS - error out here if there's stuff in it.
|
||||||
|
|
||||||
if test -n "$MISSING_PROGS"; then
|
if test -n "$MISSING_PROGS"; then
|
||||||
|
@ -401,9 +425,9 @@ dnl variable and presumably add those to your Makefile.am files. We
|
||||||
dnl have 192 of these currently, so... The user will just have to
|
dnl have 192 of these currently, so... The user will just have to
|
||||||
dnl deal, or modify them here directly.
|
dnl deal, or modify them here directly.
|
||||||
CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
|
CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
|
||||||
CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
|
CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${EXTRA_INCS} ${PTHREAD_CFLAGS}"
|
||||||
CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
|
CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${EXTRA_INCS} ${PTHREAD_CFLAGS}"
|
||||||
LIBS="${X_LIBS} ${LIBS} ${PTHREAD_LIBS}"
|
LIBS="${EXTRA_LIBS} ${LIBS} ${PTHREAD_LIBS}"
|
||||||
|
|
||||||
dnl All of the makefiles we need to generate go here...
|
dnl All of the makefiles we need to generate go here...
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
|
|
|
@ -4,23 +4,17 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
lib_LTLIBRARIES = libDtWidget.la
|
lib_LTLIBRARIES = libDtWidget.la
|
||||||
|
|
||||||
AM_CPPFLAGS = -DCDE_INSTALLATION_TOP=${prefix} @DT_INCDIR@
|
AM_CPPFLAGS = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) $(DT_INCDIR)
|
||||||
|
|
||||||
libDtWidget_la_CFLAGS = -DI18N_MSG -DMULTIBYTE
|
libDtWidget_la_CFLAGS = -DI18N_MSG -DMULTIBYTE $(FREETYPE_CFLAGS)
|
||||||
|
|
||||||
libDtWidget_la_LDFLAGS = -version-info 2:1:0
|
libDtWidget_la_LDFLAGS = -version-info 2:1:0
|
||||||
|
|
||||||
if LINUX
|
libDtWidget_la_LIBADD = $(FREETYPE_LIBS)
|
||||||
libDtWidget_la_CFLAGS += -I/usr/include/freetype2
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BSD
|
|
||||||
libDtWidget_la_CFLAGS += -I/usr/local/include/freetype2
|
|
||||||
endif
|
|
||||||
|
|
||||||
if SOLARIS
|
if SOLARIS
|
||||||
libDtWidget_la_CFLAGS += -DNO_REGCOMP
|
libDtWidget_la_CFLAGS += -DNO_REGCOMP
|
||||||
libDtWidget_la_LIBADD = -lXm -lc -lw -lm -lintl
|
libDtWidget_la_LIBADD += -lc -lw -lintl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,12 @@ dist_bin_SCRIPTS = dtfile_error
|
||||||
dtfile_CPPFLAGS = -I./dtcopy -DSHAPE -D_ILS_MACROS -DSUN_PERF \
|
dtfile_CPPFLAGS = -I./dtcopy -DSHAPE -D_ILS_MACROS -DSUN_PERF \
|
||||||
-DCDE_INSTALLATION_TOP=\"${prefix}\" \
|
-DCDE_INSTALLATION_TOP=\"${prefix}\" \
|
||||||
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
||||||
-DKORNSHELL=\"$(KSH)\" -I/usr/include/freetype2
|
-DKORNSHELL=\"$(KSH)\" $(FREETYPE_CFLAGS)
|
||||||
|
|
||||||
dtfile_LDADD = @DTCLIENTLIBS@ $(TIRPCLIB) -lXm -lXext \
|
dtfile_LDADD = dtcopy/sharedFuncs.o \
|
||||||
$(XTOOLLIB) ${X_LIBS} dtcopy/sharedFuncs.o \
|
dtcopy/fsrtns.o \
|
||||||
dtcopy/fsrtns.o
|
$(DTCLIENTLIBS) $(TIRPCLIB) -lXm -lXext $(FREETYPE_LIBS) \
|
||||||
|
$(XTOOLLIB)
|
||||||
|
|
||||||
if OPENBSD
|
if OPENBSD
|
||||||
dtfile_CPPFLAGS += -DFILE_MAP_OPTIMIZE
|
dtfile_CPPFLAGS += -DFILE_MAP_OPTIMIZE
|
||||||
|
|
|
@ -14,7 +14,7 @@ DEF_PM_PATH = $(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGUR
|
||||||
AM_CFLAGS = -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
AM_CFLAGS = -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
||||||
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
|
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
|
||||||
-DCDE_LOGFILES_TOP=\"$(CDE_LOGFILES_TOP)\" \
|
-DCDE_LOGFILES_TOP=\"$(CDE_LOGFILES_TOP)\" \
|
||||||
-I/usr/include/freetype2 -DBINDIR=\"$(XBINDIR)\" \
|
$(FREETYPE_CFLAGS) -DBINDIR=\"$(XBINDIR)\" \
|
||||||
-DXDMDIR=\"$(XDMDIR)\" \
|
-DXDMDIR=\"$(XDMDIR)\" \
|
||||||
-DKORNSHELL=$(KSH) -DUNIXCONN -DTCPCONN -DXDMCP
|
-DKORNSHELL=$(KSH) -DUNIXCONN -DTCPCONN -DXDMCP
|
||||||
|
|
||||||
|
@ -49,11 +49,11 @@ dtchooser_SOURCES = chooser.c dtchooser.c vglogo.c vgutil.c vgcallback.c \
|
||||||
vglang.c
|
vglang.c
|
||||||
|
|
||||||
dtlogin_LDADD = libresource.a @DTCLIENTLIBS@ -lXau -lXmu -lXext -lXdmcp \
|
dtlogin_LDADD = libresource.a @DTCLIENTLIBS@ -lXau -lXmu -lXext -lXdmcp \
|
||||||
$(XTOOLLIB) $(TIRPCLIB)
|
$(FREETYPE_LIBS) $(XTOOLLIB) $(TIRPCLIB)
|
||||||
|
|
||||||
dtgreet_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB)
|
dtgreet_LDADD = $(DTCLIENTLIBS) $(FREETYPE_LIBS) $(XTOOLLIB)
|
||||||
|
|
||||||
dtchooser_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) -lXmu -lXext -lXdmcp $(XTOOLLIB)
|
dtchooser_LDADD = $(DTCLIENTLIBS) $(FREETYPE_LIBS) -lXmu -lXext -lXdmcp $(XTOOLLIB)
|
||||||
|
|
||||||
|
|
||||||
if LINUX
|
if LINUX
|
||||||
|
|
Loading…
Reference in a new issue