diff --git a/dtool/Config.pp b/dtool/Config.pp index 3c8d7fb04e..ea3be1756c 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -182,6 +182,13 @@ #defer HAVE_FFTW $[libtest $[FFTW_LPATH],$[FFTW_LIBS]] +// Is NURBS++ installed, and where? +#define NURBSPP_IPATH /usr/local/include/nurbs++ +#define NURBSPP_LPATH /usr/local/lib +#define NURBSPP_LIBS nurbsf matrixN matrixI matrix +#defer HAVE_NURBSPP $[libtest $[NURBSPP_LPATH],$[NURBSPP_LIBS]] + + // Is VRPN installed, and where? #define VRPN_IPATH #define VRPN_LPATH diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 18b1353600..de8274de46 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -43,6 +43,9 @@ $[cdefine HAVE_TIFF] /* Define if we have libfftw installed. */ $[cdefine HAVE_FFTW] +/* Define if we have NURBS++ installed. */ +$[cdefine HAVE_NURBSPP] + /* Define if we have VRPN installed. */ $[cdefine HAVE_VRPN] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index ef5d09ab6d..f148e54c91 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -152,6 +152,13 @@ #define fftw_libs $[FFTW_LIBS] #endif +#if $[HAVE_NURBSPP] + #define nurbspp_ipath $[wildcard $[NURBSPP_IPATH]] + #define nurbspp_lpath $[wildcard $[NURBSPP_LPATH]] + #define nurbspp_cflags $[NURBSPP_CFLAGS] + #define nurbspp_libs $[NURBSPP_LIBS] +#endif + #if $[HAVE_VRPN] #define vrpn_ipath $[wildcard $[VRPN_IPATH]] #define vrpn_lpath $[wildcard $[VRPN_LPATH]] @@ -284,6 +291,7 @@ $[if $[HAVE_JPEG],$[IF_JPEG_SOURCES]] \ $[if $[HAVE_TIFF],$[IF_TIFF_SOURCES]] \ $[if $[HAVE_FFTW],$[IF_FFTW_SOURCES]] \ + $[if $[HAVE_NURBSPP],$[IF_NURBSPP_SOURCES]] \ $[if $[HAVE_ZLIB],$[IF_ZLIB_SOURCES]] \ $[if $[HAVE_IPC],$[IF_IPC_SOURCES]] \ $[if $[HAVE_NET],$[IF_NET_SOURCES]] \ @@ -295,6 +303,7 @@ $[IF_JPEG_SOURCES] \ $[IF_TIFF_SOURCES] \ $[IF_FFTW_SOURCES] \ + $[IF_NURBSPP_SOURCES] \ $[IF_ZLIB_SOURCES] \ $[IF_IPC_SOURCES] \ $[IF_NET_SOURCES] \ @@ -373,6 +382,9 @@ #if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs]],] #set alt_cflags $[alt_cflags] $[fftw_cflags] #endif + #if $[ne $[USE_NURBSPP] $[components $[USE_NURBSPP],$[active_component_libs]],] + #set alt_cflags $[alt_cflags] $[nurbspp_cflags] + #endif #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],] #set alt_cflags $[alt_cflags] $[vrpn_cflags] #endif @@ -435,6 +447,9 @@ #if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs]],] #set alt_ipath $[alt_ipath] $[fftw_ipath] #endif + #if $[ne $[USE_NURBSPP] $[components $[USE_NURBSPP],$[active_component_libs]],] + #set alt_ipath $[alt_ipath] $[nurbspp_ipath] + #endif #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],] #set alt_ipath $[alt_ipath] $[vrpn_ipath] #endif @@ -497,6 +512,9 @@ #if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs] $[transitive_link]],] #set alt_lpath $[alt_lpath] $[fftw_lpath] #endif + #if $[ne $[USE_NURBSPP] $[components $[USE_NURBSPP],$[active_component_libs] $[transitive_link]],] + #set alt_lpath $[alt_lpath] $[nurbspp_lpath] + #endif #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],] #set alt_lpath $[alt_lpath] $[vrpn_lpath] #endif @@ -560,6 +578,9 @@ #if $[ne $[USE_FFTW] $[components $[USE_FFTW],$[active_component_libs] $[transitive_link]],] #set alt_libs $[alt_libs] $[fftw_libs] #endif + #if $[ne $[USE_NURBSPP] $[components $[USE_NURBSPP],$[active_component_libs] $[transitive_link]],] + #set alt_libs $[alt_libs] $[nurbspp_libs] + #endif #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],] #set alt_libs $[alt_libs] $[vrpn_libs] #endif diff --git a/dtool/src/dtoolutil/filename.cxx b/dtool/src/dtoolutil/filename.cxx index 42864682ac..332d9aa775 100644 --- a/dtool/src/dtoolutil/filename.cxx +++ b/dtool/src/dtoolutil/filename.cxx @@ -608,6 +608,9 @@ make_canonical() { //////////////////////////////////////////////////////////////////// string Filename:: to_os_specific() const { + if (empty()) { + return string(); + } Filename standard(*this); standard.standardize(); diff --git a/dtool/src/parser-inc/Sources.pp b/dtool/src/parser-inc/Sources.pp index 79e12ee0c0..246eac2b57 100644 --- a/dtool/src/parser-inc/Sources.pp +++ b/dtool/src/parser-inc/Sources.pp @@ -1,3 +1,4 @@ #define INSTALL_PARSER_INC \ deque iostream list map pair queue set stack stdtypedefs.h \ - string vector windows.h zlib.h md5.h files.h hex.h + string vector windows.h zlib.h md5.h files.h hex.h \ + nurbs.hh diff --git a/dtool/src/parser-inc/nurbs.hh b/dtool/src/parser-inc/nurbs.hh new file mode 100644 index 0000000000..934fa9ebff --- /dev/null +++ b/dtool/src/parser-inc/nurbs.hh @@ -0,0 +1,19 @@ +// Filename: nurbs.hh +// Created by: drose (02Mar01) +// +//////////////////////////////////////////////////////////////////// + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef NURBS_HH +#define NURBS_HH + +namespace PLib { + class NurbsCurvef; +}; + +#endif +