From c58e78428e1ff9955b45f6a5def9fe8224179dba Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 8 Feb 2002 23:32:26 +0000 Subject: [PATCH] add freetype2 to external library list --- dtool/Config.pp | 5 +++++ dtool/LocalSetup.pp | 3 +++ dtool/Package.pp | 13 +++++++++++++ dtool/pptempl/Global.pp | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/dtool/Config.pp b/dtool/Config.pp index c07acb80ab..b144e5a7b8 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -313,6 +313,11 @@ #define GTKMM_CONFIG gtkmm-config #defer HAVE_GTKMM $[bintest $[GTKMM_CONFIG]] +// Do we have Freetype 2.0 (or better)? If available, this package is +// used to generate dynamic in-the-world text from font files. +#define FREETYPE_CONFIG freetype-config +#defer HAVE_FREETYPE $[bintest $[FREETYPE_CONFIG]] + // Is Maya installed? This matters only to programs in PANDATOOL. #define MAYA_LOCATION /usr/aw/maya3.0 #defer HAVE_MAYA $[isdir $[MAYA_LOCATION]] diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index cae46222c1..b2a3a01f53 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -37,6 +37,9 @@ $[cdefine TRACK_IN_INTERPRETER] /* Define if we have RAD game tools, Miles Sound System installed. */ $[cdefine HAVE_RAD_MSS] +/* Define if we have Freetype 2.0 or better available. */ +$[cdefine HAVE_FREETYPE] + /* Define if we have NSPR installed. */ $[cdefine HAVE_NSPR] diff --git a/dtool/Package.pp b/dtool/Package.pp index 2869265313..b2e6295afa 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -161,6 +161,9 @@ #set GTKMM_CONFIG $[GTKMM_CONFIG] #set HAVE_GTKMM $[HAVE_GTKMM] +#set FREETYPE_CONFIG $[FREETYPE_CONFIG] +#set HAVE_FREETYPE $[HAVE_FREETYPE] + #set MAYA_LOCATION $[MAYA_LOCATION] #set HAVE_MAYA $[HAVE_MAYA] @@ -186,6 +189,16 @@ #define GTKMM_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]] #endif +#if $[and $[HAVE_FREETYPE],$[FREETYPE_CONFIG]] + #define cflags $[shell $[FREETYPE_CONFIG] --cflags] + #define libs $[shell $[FREETYPE_CONFIG] --libs] + + #define FREETYPE_CFLAGS $[filter-out -I%,$[cflags]] + #define FREETYPE_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]] + #define FREETYPE_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]] + #define FREETYPE_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]] +#endif + // Finally, include the system configure file. #include $[THISDIRPREFIX]pptempl/System.pp diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 940f803c8a..8262e1f73a 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -185,6 +185,13 @@ #define gtkmm_libs $[GTKMM_LIBS] #endif +#if $[HAVE_FREETYPE] + #define freetype_ipath $[wildcard $[FREETYPE_IPATH]] + #define freetype_lpath $[wildcard $[FREETYPE_LPATH]] + #define freetype_cflags $[FREETYPE_CFLAGS] + #define freetype_libs $[FREETYPE_LIBS] +#endif + #if $[and $[HAVE_MAYA],$[MAYA_LOCATION]] #define maya_ipath $[MAYA_LOCATION]/include #define maya_lpath $[MAYA_LOCATION]/lib @@ -423,6 +430,9 @@ #if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs]],] #set alt_cflags $[alt_cflags] $[gtkmm_cflags] #endif + #if $[ne $[USE_FREETYPE] $[components $[USE_FREETYPE],$[active_component_libs]],] + #set alt_cflags $[alt_cflags] $[freetype_cflags] + #endif #if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs]],] #set alt_cflags $[alt_cflags] $[maya_cflags] #endif @@ -488,6 +498,9 @@ #if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs]],] #set alt_ipath $[alt_ipath] $[gtkmm_ipath] #endif + #if $[ne $[USE_FREETYPE] $[components $[USE_FREETYPE],$[active_component_libs]],] + #set alt_ipath $[alt_ipath] $[freetype_ipath] + #endif #if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs]],] #set alt_ipath $[alt_ipath] $[maya_ipath] #endif @@ -556,6 +569,9 @@ #if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs] $[transitive_link]],] #set alt_lpath $[alt_lpath] $[gtkmm_lpath] #endif + #if $[ne $[USE_FREETYPE] $[components $[USE_FREETYPE],$[active_component_libs] $[transitive_link]],] + #set alt_lpath $[alt_lpath] $[freetype_lpath] + #endif #if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs] $[transitive_link]],] #set alt_lpath $[alt_lpath] $[maya_lpath] #endif @@ -622,6 +638,9 @@ #if $[ne $[USE_GTKMM] $[components $[USE_GTKMM],$[active_component_libs] $[transitive_link]],] #set alt_libs $[alt_libs] $[gtkmm_libs] #endif + #if $[ne $[USE_FREETYPE] $[components $[USE_FREETYPE],$[active_component_libs] $[transitive_link]],] + #set alt_libs $[alt_libs] $[freetype_libs] + #endif #if $[ne $[USE_MAYA] $[components $[USE_MAYA],$[active_component_libs] $[transitive_link]],] #set alt_libs $[alt_libs] $[maya_libs] #endif