diff --git a/dtool/Config.pp b/dtool/Config.pp index bdb0a5b866..59b15b03af 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -463,6 +463,13 @@ #define TIFF_LIBS tiff z #defer HAVE_TIFF $[libtest $[TIFF_LPATH],$[TIFF_LIBS]] +// Is libtar installed, and where? This is used to optimize patch +// generation against tar files. +#define TAR_IPATH +#define TAR_LPATH +#define TAR_LIBS tar +#defer HAVE_TAR $[libtest $[TAR_LPATH],$[TAR_LIBS]] + // Is libfftw installed, and where? #define FFTW_IPATH /usr/local/include diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index e7fbf83429..8061690382 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -31,6 +31,11 @@ #else #print - Did not find libtiff #endif +#if $[HAVE_TAR] +#print + libtar +#else +#print - Did not find libtar +#endif #if $[HAVE_FFTW] #print + fftw #else @@ -190,6 +195,9 @@ $[cdefine HAVE_PNG] /* Define if we have libtiff installed. */ $[cdefine HAVE_TIFF] +/* Define if we have libtar installed. */ +$[cdefine HAVE_TAR] + /* Define if we have libfftw installed. */ $[cdefine HAVE_FFTW] diff --git a/dtool/Package.pp b/dtool/Package.pp index b4e42a32d9..1e9a3acc2b 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -135,6 +135,11 @@ #set TIFF_LIBS $[TIFF_LIBS] #set HAVE_TIFF $[HAVE_TIFF] +#set TAR_IPATH $[unixfilename $[TAR_IPATH]] +#set TAR_LPATH $[unixfilename $[TAR_LPATH]] +#set TAR_LIBS $[TAR_LIBS] +#set HAVE_TAR $[HAVE_TAR] + #set FFTW_IPATH $[unixfilename $[FFTW_IPATH]] #set FFTW_LPATH $[unixfilename $[FFTW_LPATH]] #set FFTW_LIBS $[FFTW_LIBS] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index d4ba7db098..e2a3321821 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -211,6 +211,13 @@ #define tiff_libs $[TIFF_LIBS] #endif +#if $[HAVE_TAR] + #define tar_ipath $[wildcard $[TAR_IPATH]] + #define tar_lpath $[wildcard $[TAR_LPATH]] + #define tar_cflags $[TAR_CFLAGS] + #define tar_libs $[TAR_LIBS] +#endif + #if $[HAVE_FFTW] #define fftw_ipath $[wildcard $[FFTW_IPATH]] #define fftw_lpath $[wildcard $[FFTW_LPATH]]