LocalSetup.pp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. //
  2. // LocalSetup.pp
  3. //
  4. // This file contains further instructions to set up the DTOOL package
  5. // when using ppremake. In particular, it creates the dtool_config.h
  6. // file based on the user's selected configure variables. This script
  7. // need not execute when BUILD_TYPE is "autoconf"; in this case, the
  8. // dtool_config.h file will automatically be correctly generated by
  9. // configure.
  10. //
  11. #print
  12. #print Configuring support for the following optional third-party packages:
  13. #if $[HAVE_NSPR]
  14. #print + NSPR
  15. #else
  16. #print - Did not find NSPR
  17. #endif
  18. #if $[HAVE_OPENSSL]
  19. #print + OpenSSL
  20. #else
  21. #print - Did not find OpenSSL
  22. #endif
  23. #if $[HAVE_JPEG]
  24. #print + libjpeg
  25. #else
  26. #print - Did not find libjpeg
  27. #endif
  28. #if $[HAVE_PNG]
  29. #print + libpng
  30. #else
  31. #print - Did not find libpng
  32. #endif
  33. #if $[HAVE_TIFF]
  34. #print + libtiff
  35. #else
  36. #print - Did not find libtiff
  37. #endif
  38. #if $[HAVE_FFTW]
  39. #print + fftw
  40. #else
  41. #print - Did not find fftw
  42. #endif
  43. #if $[HAVE_CG]
  44. #print + Nvidia Cg High Level Shading Language
  45. #else
  46. #print - Did not find Nvidia Cg High Level Shading Language
  47. #endif
  48. #if $[HAVE_CGGL]
  49. #print + Cg OpenGL API
  50. #else
  51. #print - Did not find Cg OpenGL API
  52. #endif
  53. #if $[HAVE_CGDX8]
  54. #print + Cg DX8 API
  55. #else
  56. #print - Did not find Cg DX8 API
  57. #endif
  58. #if $[HAVE_CGDX9]
  59. #print + Cg DX9 API
  60. #else
  61. #print - Did not find Cg DX9 API
  62. #endif
  63. #if $[HAVE_CGDX10]
  64. #print + Cg DX10 API
  65. #else
  66. #print - Did not find Cg DX10 API
  67. #endif
  68. #if $[HAVE_VRPN]
  69. #print + VRPN
  70. #else
  71. #print - Did not find VRPN
  72. #endif
  73. #if $[HAVE_ZLIB]
  74. #print + zlib
  75. #else
  76. #print - Did not find zlib
  77. #endif
  78. #if $[HAVE_RAD_MSS]
  79. #print + Miles Sound System
  80. #else
  81. #print - Did not find Miles Sound System
  82. #endif
  83. #if $[HAVE_FMOD]
  84. #print + FMOD sound library
  85. #else
  86. #print - Did not find FMOD sound library
  87. #endif
  88. #if $[HAVE_FREETYPE]
  89. #print + Freetype
  90. #else
  91. #print - Did not find Freetype
  92. #endif
  93. #if $[HAVE_GL]
  94. #print + OpenGL
  95. #else
  96. #print - Did not find OpenGL
  97. #endif
  98. #if $[HAVE_DX]
  99. #print + DirectX
  100. #else
  101. #print - Did not find DirectX
  102. #endif
  103. #if $[HAVE_OPENCV]
  104. #print + OpenCV
  105. #else
  106. #print - Did not find OpenCV
  107. #endif
  108. #if $[HAVE_MAYA]
  109. #print + OpenMaya
  110. #else
  111. #print - Did not find OpenMaya
  112. #endif
  113. #print
  114. #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]]
  115. #print Compilation will generate Python interfaces.
  116. #else
  117. #print Configuring Panda WITHOUT Python interfaces.
  118. #endif
  119. #print
  120. #print See dtool_config.h for more details about the specified configuration.
  121. #print
  122. // We don't include the ppremake version in the first comment line of
  123. // the output to dtool_config.h, below, to minimize unnecessary
  124. // complete rebuilds due to an updated ppremake version.
  125. #output dtool_config.h notouch
  126. #format straight
  127. /* dtool_config.h. Generated automatically by $[PPREMAKE] from $[SOURCEFILE]. */
  128. /* Define if we have Python installed. */
  129. $[cdefine HAVE_PYTHON]
  130. $[cdefine USE_DEBUG_PYTHON]
  131. /* Define if we have Python as a framework (Mac OS X). */
  132. $[cdefine PYTHON_FRAMEWORK]
  133. /* Define if we have RAD game tools, Miles Sound System installed. */
  134. $[cdefine HAVE_RAD_MSS]
  135. /* Define if we have FMOD installed. */
  136. $[cdefine HAVE_FMOD]
  137. /* Define if we have Freetype 2.0 or better available. */
  138. $[cdefine HAVE_FREETYPE]
  139. /* Define if we want to compile in a default font. */
  140. $[cdefine COMPILE_IN_DEFAULT_FONT]
  141. /* Define if we have Maya available. */
  142. $[cdefine HAVE_MAYA]
  143. $[cdefine MAYA_PRE_5_0]
  144. /* Define if we have SoftImage available. */
  145. $[cdefine HAVE_SOFTIMAGE]
  146. /* Define if we have NSPR installed. */
  147. $[cdefine HAVE_NSPR]
  148. /* Define if we have OpenSSL installed. */
  149. $[cdefine HAVE_OPENSSL]
  150. $[cdefine OPENSSL_097]
  151. $[cdefine REPORT_OPENSSL_ERRORS]
  152. /* Define if we have libjpeg installed. */
  153. $[cdefine HAVE_JPEG]
  154. /* Define if we have libpng installed. */
  155. $[cdefine HAVE_PNG]
  156. /* Define if we have libtiff installed. */
  157. $[cdefine HAVE_TIFF]
  158. /* Define if we have libfftw installed. */
  159. $[cdefine HAVE_FFTW]
  160. /* Define if we have NURBS++ installed. */
  161. $[cdefine HAVE_NURBSPP]
  162. /* Define if we have VRPN installed. */
  163. $[cdefine HAVE_VRPN]
  164. /* Define if we have HELIX installed. */
  165. $[cdefine HAVE_HELIX]
  166. /* Define if we have CG installed. */
  167. $[cdefine HAVE_CG]
  168. /* Define if we have CGGL installed. */
  169. $[cdefine HAVE_CGGL]
  170. /* Define if we have CGDX8 installed. */
  171. $[cdefine HAVE_CGDX8]
  172. /* Define if we have CGDX9 installed. */
  173. $[cdefine HAVE_CGDX9]
  174. /* Define if we have CGDX10 installed. */
  175. $[cdefine HAVE_CGDX10]
  176. /* Define if we have zlib installed. */
  177. $[cdefine HAVE_ZLIB]
  178. /* Define if we have OpenGL installed and want to build for GL. */
  179. $[cdefine HAVE_GL]
  180. /* Define if we have OpenCV installed and want to build for OpenCV. */
  181. $[cdefine HAVE_OPENCV]
  182. /* Define if we have Mesa installed and want to build mesadisplay. */
  183. $[cdefine HAVE_MESA]
  184. $[cdefine MESA_MGL]
  185. /* Define if we want to build with SGI OpenGL extensions. */
  186. $[cdefine HAVE_SGIGL]
  187. /* Define if we have GLX installed and want to build for GLX. */
  188. $[cdefine HAVE_GLX]
  189. /* Define if we have Windows-GL installed and want to build for Wgl. */
  190. $[cdefine HAVE_WGL]
  191. /* Define if we have DirectX installed and want to build for DX. */
  192. $[cdefine HAVE_DX]
  193. /* Define if we have Chromium installed and want to use it. */
  194. $[cdefine HAVE_CHROMIUM]
  195. /* Define if we want to compile the threading code. */
  196. $[cdefine HAVE_THREADS]
  197. /* Define to check that ordinary (non-reentrant) Mutexes are not reentrantly locked. */
  198. $[cdefine CHECK_REENTRANT_MUTEX]
  199. /* Define if we want to compile the net code. */
  200. $[cdefine HAVE_NET]
  201. /* Define if we want to compile the audio code. */
  202. $[cdefine HAVE_AUDIO]
  203. /* Define if we have bison and flex available. */
  204. $[cdefine HAVE_BISON]
  205. /* Define if we want to use PStats. */
  206. $[cdefine DO_PSTATS]
  207. /* Define if we want to type-check downcasts. */
  208. $[cdefine DO_DCAST]
  209. /* Define if we want to provide collision system recording and
  210. visualization tools. */
  211. $[cdefine DO_COLLISION_RECORDING]
  212. /* Define if we want to track callbacks from within the show code. */
  213. $[cdefine TRACK_IN_INTERPRETER]
  214. /* Define if we want to enable track-memory-usage. */
  215. $[cdefine DO_MEMORY_USAGE]
  216. /* Define if we want to enable min-lag and max-lag. */
  217. $[cdefine SIMULATE_NETWORK_DELAY]
  218. /* Define if we want to allow immediate mode OpenGL rendering. */
  219. $[cdefine SUPPORT_IMMEDIATE_MODE]
  220. /* Define if we want to compile in support for pipelining. */
  221. $[cdefine DO_PIPELINING]
  222. /* Define if we want to keep Notify debug messages around, or undefine
  223. to compile them out. */
  224. $[cdefine NOTIFY_DEBUG]
  225. /* Define if we want to export template classes from the DLL. Only
  226. makes sense to MSVC++. */
  227. $[cdefine EXPORT_TEMPLATES]
  228. /* Define if we are linking PANDAGL in with PANDA. */
  229. $[cdefine LINK_IN_GL]
  230. /* Define if we are linking PANDAPHYSICS in with PANDA. */
  231. $[cdefine LINK_IN_PHYSICS]
  232. /* The compiled-in character(s) to expect to separate different
  233. components of a path list (e.g. $PRC_PATH). */
  234. # define DEFAULT_PATHSEP "$[DEFAULT_PATHSEP]"
  235. /* The compiled-in default directory to look for the Configrc file, in
  236. the absence of the PRC_DIR environment variable set, and in
  237. the absence of anything specified via the configpath directive. */
  238. # define DEFAULT_PRC_DIR "$[unixfilename $[DEFAULT_PRC_DIR]]"
  239. /* The compiled-in name of the environment variable(s) that contain
  240. the name of a single directory in which to search for prc files. */
  241. # define PRC_DIR_ENVVARS "$[PRC_DIR_ENVVARS]"
  242. /* The compiled-in name of the environment variable(s) that contain
  243. the name of multiple directories, separated by DEFAULT_PATHSEP, in
  244. which to search for prc files. */
  245. # define PRC_PATH_ENVVARS "$[PRC_PATH_ENVVARS]"
  246. /* The filename(s) to search for in the above paths. Normally this is
  247. *.prc. */
  248. # define PRC_PATTERNS "$[PRC_PATTERNS]"
  249. /* The filename(s) to search for, and execute, in the above paths.
  250. Normally this is empty. */
  251. # define PRC_EXECUTABLE_PATTERNS "$[PRC_EXECUTABLE_PATTERNS]"
  252. /* The environment variable that defines optional args to pass to
  253. executables found that match one of the above patterns. */
  254. # define PRC_EXECUTABLE_ARGS_ENVVAR "$[PRC_EXECUTABLE_ARGS_ENVVAR]"
  255. /* The filename that specifies the public keys to import into
  256. config. */
  257. # define PRC_PUBLIC_KEYS_FILENAME "$[unixfilename $[PRC_PUBLIC_KEYS_FILENAME]]"
  258. #if $[PRC_PUBLIC_KEYS_FILENAME]
  259. # define PRC_PUBLIC_KEYS_INCLUDE "$[osfilename $[PRC_PUBLIC_KEYS_FILENAME]]"
  260. #endif
  261. /* Define if we want to enable the "trust_level" feature of prc config
  262. variables. This requires OpenSSL and PRC_PUBLIC_KEYS_FILENAME,
  263. above. */
  264. $[cdefine PRC_RESPECT_TRUST_LEVEL]
  265. /* Define if you want to save the descriptions for ConfigVariables. */
  266. $[cdefine PRC_SAVE_DESCRIPTIONS]
  267. /* Define if your processor stores words with the most significant
  268. byte first (like Motorola and SPARC, unlike Intel and VAX). */
  269. $[cdefine WORDS_BIGENDIAN]
  270. /* Define if the C++ compiler uses namespaces. */
  271. $[cdefine HAVE_NAMESPACE]
  272. /* Define if fstream::open() accepts a third parameter for umask. */
  273. $[cdefine HAVE_OPEN_MASK]
  274. /* Define if some header file defines wchar_t. */
  275. $[cdefine HAVE_WCHAR_T]
  276. /* Define if the <string> header file defines wstring. */
  277. $[cdefine HAVE_WSTRING]
  278. /* Define if the C++ compiler supports the typename keyword. */
  279. $[cdefine HAVE_TYPENAME]
  280. /* Define if we can trust the compiler not to insert extra bytes in
  281. structs between base structs and derived structs. */
  282. $[cdefine SIMPLE_STRUCT_POINTERS]
  283. /* Define if we have Dinkumware STL installed. */
  284. $[cdefine HAVE_DINKUM]
  285. /* Define if we have STL hash_map etc. available */
  286. $[cdefine HAVE_STL_HASH]
  287. /* Define if we have a gettimeofday() function. */
  288. $[cdefine HAVE_GETTIMEOFDAY]
  289. /* Define if gettimeofday() takes only one parameter. */
  290. $[cdefine GETTIMEOFDAY_ONE_PARAM]
  291. /* Define if you have the getopt function. */
  292. $[cdefine HAVE_GETOPT]
  293. /* Define if you have the getopt_long_only function. */
  294. $[cdefine HAVE_GETOPT_LONG_ONLY]
  295. /* Define if getopt appears in getopt.h. */
  296. $[cdefine HAVE_GETOPT_H]
  297. /* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
  298. $[cdefine IOCTL_TERMINAL_WIDTH]
  299. /* Do the system headers define a "streamsize" typedef? */
  300. $[cdefine HAVE_STREAMSIZE]
  301. /* Do the system headers define key ios typedefs like ios::openmode
  302. and ios::fmtflags? */
  303. $[cdefine HAVE_IOS_TYPEDEFS]
  304. /* Define if the C++ iostream library defines ios::binary. */
  305. $[cdefine HAVE_IOS_BINARY]
  306. /* Can we safely call getenv() at static init time? */
  307. $[cdefine STATIC_INIT_GETENV]
  308. /* Can we read the file /proc/self/environ to determine our
  309. environment variables at static init time? */
  310. $[cdefine HAVE_PROC_SELF_ENVIRON]
  311. /* Do we have a global pair of argc/argv variables that we can read at
  312. static init time? Should we prototype them? What are they called? */
  313. $[cdefine HAVE_GLOBAL_ARGV]
  314. $[cdefine PROTOTYPE_GLOBAL_ARGV]
  315. $[cdefine GLOBAL_ARGV]
  316. $[cdefine GLOBAL_ARGC]
  317. /* Can we read the file /proc/self/cmdline to determine our
  318. command-line arguments at static init time? */
  319. $[cdefine HAVE_PROC_SELF_CMDLINE]
  320. /* Define if you have the <io.h> header file. */
  321. $[cdefine HAVE_IO_H]
  322. /* Define if you have the <iostream> header file. */
  323. $[cdefine HAVE_IOSTREAM]
  324. /* Define if you have the <malloc.h> header file. */
  325. $[cdefine HAVE_MALLOC_H]
  326. /* Define if you have the <sys/malloc.h> header file. */
  327. $[cdefine HAVE_SYS_MALLOC_H]
  328. /* Define if you have the <alloca.h> header file. */
  329. $[cdefine HAVE_ALLOCA_H]
  330. /* Define if you have the <locale.h> header file. */
  331. $[cdefine HAVE_LOCALE_H]
  332. /* Define if you have the <minmax.h> header file. */
  333. $[cdefine HAVE_MINMAX_H]
  334. /* Define if you have the <sstream> header file. */
  335. $[cdefine HAVE_SSTREAM]
  336. /* Define if you have the <new> header file. */
  337. $[cdefine HAVE_NEW]
  338. /* Define if you have the <sys/types.h> header file. */
  339. $[cdefine HAVE_SYS_TYPES_H]
  340. /* Define if you have the <sys/time.h> header file. */
  341. $[cdefine HAVE_SYS_TIME_H]
  342. /* Define if you have the <unistd.h> header file. */
  343. $[cdefine HAVE_UNISTD_H]
  344. /* Define if you have the <utime.h> header file. */
  345. $[cdefine HAVE_UTIME_H]
  346. /* Define if you have the <glob.h> header file. */
  347. $[cdefine HAVE_GLOB_H]
  348. /* Define if you have the <dirent.h> header file. */
  349. $[cdefine HAVE_DIRENT_H]
  350. /* Do we have <sys/soundcard.h> (and presumably a Linux-style audio
  351. interface)? */
  352. $[cdefine HAVE_SYS_SOUNDCARD_H]
  353. /* Do we have RTTI (and <typeinfo>)? */
  354. $[cdefine HAVE_RTTI]
  355. /* Must global operator new and delete functions throw exceptions? */
  356. $[cdefine GLOBAL_OPERATOR_NEW_EXCEPTIONS]
  357. /* Which memory allocation scheme should we use? */
  358. #define USE_MEMORY_DLMALLOC
  359. #define USE_MEMORY_PTMALLOC2
  360. #define USE_MEMORY_MALLOC
  361. #define USE_MEMORY_NOWRAPPERS
  362. #if $[ALTERNATIVE_MALLOC]
  363. #if $[HAVE_THREADS]
  364. // A fast thread-safe alternative implementation.
  365. #set USE_MEMORY_PTMALLOC2 1
  366. #else
  367. // A faster, but non-thread-safe, alternative implementation.
  368. #set USE_MEMORY_DLMALLOC 1
  369. #endif
  370. #else
  371. #if $[DO_MEMORY_USAGE]
  372. // Redefine new and delete to malloc(), and also provide hooks for
  373. // the benefit of the MemoryUsage class.
  374. #set USE_MEMORY_MALLOC 1
  375. #else
  376. // Don't redefine new and delete at all.
  377. #set USE_MEMORY_NOWRAPPERS 1
  378. #endif
  379. #endif
  380. $[cdefine USE_MEMORY_DLMALLOC]
  381. $[cdefine USE_MEMORY_PTMALLOC2]
  382. $[cdefine USE_MEMORY_MALLOC]
  383. $[cdefine USE_MEMORY_NOWRAPPERS]
  384. /* What style STL allocator should we declare? */
  385. #define OLD_STYLE_ALLOCATOR
  386. #define GNU_STYLE_ALLOCATOR
  387. #define VC6_STYLE_ALLOCATOR
  388. #define MODERN_STYLE_ALLOCATOR
  389. #define NO_STYLE_ALLOCATOR
  390. #if $[eq $[OPTIMIZE], 4]
  391. // In optimize level 4, we never try to use custom allocators.
  392. #set NO_STYLE_ALLOCATOR 1
  393. #elif $[eq $[STL_ALLOCATOR], OLD]
  394. // "OLD": Irix 6.2-era STL.
  395. #set OLD_STYLE_ALLOCATOR 1
  396. #elif $[eq $[STL_ALLOCATOR], GNU]
  397. // "GNU": gcc 2.95-era.
  398. #set GNU_STYLE_ALLOCATOR 1
  399. #elif $[eq $[STL_ALLOCATOR], VC6]
  400. // "VC6": Microsoft Visual C++ 6.
  401. #set VC6_STYLE_ALLOCATOR 1
  402. #elif $[eq $[STL_ALLOCATOR], MODERN]
  403. // "MODERN": Have we finally come to a standard?
  404. #set MODERN_STYLE_ALLOCATOR 1
  405. #else
  406. // Anything else is "unknown". We won't try to define allocators at
  407. // all.
  408. #set NO_STYLE_ALLOCATOR 1
  409. #endif
  410. $[cdefine OLD_STYLE_ALLOCATOR]
  411. $[cdefine GNU_STYLE_ALLOCATOR]
  412. $[cdefine VC6_STYLE_ALLOCATOR]
  413. $[cdefine MODERN_STYLE_ALLOCATOR]
  414. $[cdefine NO_STYLE_ALLOCATOR]
  415. #end dtool_config.h