LocalSetup.pp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  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_OPENSSL]
  14. #print + OpenSSL
  15. #else
  16. #print - Did not find OpenSSL
  17. #endif
  18. #if $[HAVE_JPEG]
  19. #print + libjpeg
  20. #else
  21. #print - Did not find libjpeg
  22. #endif
  23. #if $[HAVE_PNG]
  24. #print + libpng
  25. #else
  26. #print - Did not find libpng
  27. #endif
  28. #if $[HAVE_TIFF]
  29. #print + libtiff
  30. #else
  31. #print - Did not find libtiff
  32. #endif
  33. #if $[HAVE_TAR]
  34. #print + libtar
  35. #else
  36. #print - Did not find libtar
  37. #endif
  38. #if $[HAVE_FFTW]
  39. #print + fftw
  40. #else
  41. #print - Did not find fftw
  42. #endif
  43. #if $[HAVE_SQUISH]
  44. #print + squish
  45. #else
  46. #print - Did not find squish
  47. #endif
  48. #if $[HAVE_CG]
  49. #print + Nvidia Cg High Level Shading Language
  50. #else
  51. #print - Did not find Nvidia Cg High Level Shading Language
  52. #endif
  53. #if $[HAVE_CGGL]
  54. #print + Cg OpenGL API
  55. #else
  56. #print - Did not find Cg OpenGL API
  57. #endif
  58. #if $[HAVE_CGDX8]
  59. #print + Cg DX8 API
  60. #else
  61. #print - Did not find Cg DX8 API
  62. #endif
  63. #if $[HAVE_CGDX9]
  64. #print + Cg DX9 API
  65. #else
  66. #print - Did not find Cg DX9 API
  67. #endif
  68. #if $[HAVE_CGDX10]
  69. #print + Cg DX10 API
  70. #else
  71. #print - Did not find Cg DX10 API
  72. #endif
  73. #if $[HAVE_VRPN]
  74. #print + VRPN
  75. #else
  76. #print - Did not find VRPN
  77. #endif
  78. #if $[HAVE_ZLIB]
  79. #print + zlib
  80. #else
  81. #print - Did not find zlib
  82. #endif
  83. #if $[HAVE_RAD_MSS]
  84. #print + Miles Sound System
  85. #else
  86. #print - Did not find Miles Sound System
  87. #endif
  88. #if $[HAVE_FMODEX]
  89. #print + FMOD Ex sound library
  90. #else
  91. #print - Did not find FMOD Ex sound library
  92. #endif
  93. #if $[HAVE_GTK]
  94. #print + gtk+-2
  95. #else
  96. #print - Did not find gtk+-2
  97. #endif
  98. #if $[HAVE_FREETYPE]
  99. #print + Freetype
  100. #else
  101. #print - Did not find Freetype
  102. #endif
  103. #if $[HAVE_GL]
  104. #print + OpenGL
  105. #else
  106. #print - Did not find OpenGL
  107. #endif
  108. #if $[HAVE_DX8]
  109. #print + DirectX8
  110. #else
  111. #print - Did not find DirectX8
  112. #endif
  113. #if $[HAVE_DX9]
  114. #print + DirectX9
  115. #else
  116. #print - Did not find DirectX9
  117. #endif
  118. #if $[HAVE_TINYDISPLAY]
  119. #print + Tinydisplay
  120. #else
  121. #print - Not building Tinydisplay
  122. #endif
  123. //#if $[HAVE_SDL]
  124. //#print + SDL
  125. //#else
  126. //#print - Did not find SDL
  127. //#endif
  128. #if $[HAVE_X11]
  129. #print + X11
  130. #else
  131. #print - Did not find X11
  132. #endif
  133. #if $[HAVE_MESA]
  134. #print + Mesa
  135. #else
  136. #print - Did not find Mesa
  137. #endif
  138. #if $[HAVE_OPENCV]
  139. #print + OpenCV
  140. #else
  141. #print - Did not find OpenCV
  142. #endif
  143. #if $[HAVE_FFMPEG]
  144. #print + FFMPEG
  145. #else
  146. #print - Did not find FFMPEG
  147. #endif
  148. #if $[HAVE_ODE]
  149. #print + ODE
  150. #else
  151. #print - Did not find ODE
  152. #endif
  153. #if $[HAVE_MAYA]
  154. #print + OpenMaya
  155. #else
  156. #print - Did not find OpenMaya
  157. #endif
  158. #if $[HAVE_FCOLLADA]
  159. #print + FCollada
  160. #else
  161. #print - Did not find FCollada
  162. #endif
  163. #if $[HAVE_ARTOOLKIT]
  164. #print + ARToolKit
  165. #else
  166. #print - Did not find ARToolKit
  167. #endif
  168. #print
  169. #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]]
  170. #print Compilation will generate Python interfaces.
  171. #else
  172. #print Configuring Panda WITHOUT Python interfaces.
  173. #endif
  174. #if $[HAVE_THREADS]
  175. #if $[SIMPLE_THREADS]
  176. #print Compilation will include simulated threading support.
  177. #else
  178. #if $[DO_PIPELINING]
  179. #print Compilation will include full, pipelined threading support.
  180. #else
  181. #print Compilation will include nonpipelined threading support.
  182. #endif
  183. #endif
  184. #else
  185. #print Configuring Panda without threading support.
  186. #endif
  187. #print
  188. #print See dtool_config.h for more details about the specified configuration.
  189. #print
  190. // We don't include the ppremake version in the first comment line of
  191. // the output to dtool_config.h, below, to minimize unnecessary
  192. // complete rebuilds due to an updated ppremake version.
  193. #output dtool_config.h notouch
  194. #format straight
  195. /* dtool_config.h. Generated automatically by $[PPREMAKE] from $[SOURCEFILE]. */
  196. /* Define if we have Python installed. */
  197. $[cdefine HAVE_PYTHON]
  198. $[cdefine USE_DEBUG_PYTHON]
  199. /* Define if we have Python as a framework (Mac OS X). */
  200. $[cdefine PYTHON_FRAMEWORK]
  201. /* Define if we have RAD game tools, Miles Sound System installed. */
  202. $[cdefine HAVE_RAD_MSS]
  203. /* Define if we have FMODex installed. */
  204. $[cdefine HAVE_FMODEX]
  205. /* Define if we have Freetype 2.0 or better available. */
  206. $[cdefine HAVE_FREETYPE]
  207. /* Define if we want to compile in a default font. */
  208. $[cdefine COMPILE_IN_DEFAULT_FONT]
  209. /* Define if we have Maya available. */
  210. $[cdefine HAVE_MAYA]
  211. $[cdefine MAYA_PRE_5_0]
  212. /* Define if we have SoftImage available. */
  213. $[cdefine HAVE_SOFTIMAGE]
  214. /* Define if we have FCollada available. */
  215. $[cdefine HAVE_FCOLLADA]
  216. /* Define if we have ARToolKit available. */
  217. $[cdefine HAVE_ARTOOLKIT]
  218. /* Define if we have OpenSSL installed. */
  219. $[cdefine HAVE_OPENSSL]
  220. $[cdefine OPENSSL_097]
  221. $[cdefine REPORT_OPENSSL_ERRORS]
  222. /* Define if we have libjpeg installed. */
  223. $[cdefine HAVE_JPEG]
  224. /* Define if we have libpng installed. */
  225. $[cdefine HAVE_PNG]
  226. /* Define if we have libtiff installed. */
  227. $[cdefine HAVE_TIFF]
  228. /* Define if we have libtar installed. */
  229. $[cdefine HAVE_TAR]
  230. /* Define if we have libfftw installed. */
  231. $[cdefine HAVE_FFTW]
  232. /* Define if we have libsquish installed. */
  233. $[cdefine HAVE_SQUISH]
  234. /* Define if we have Berkeley DB installed. */
  235. $[cdefine HAVE_BDB]
  236. /* Define if we have VRPN installed. */
  237. $[cdefine HAVE_VRPN]
  238. /* Define if we have HELIX installed. */
  239. $[cdefine HAVE_HELIX]
  240. /* Define if we have CG installed. */
  241. $[cdefine HAVE_CG]
  242. /* Define if we have CGGL installed. */
  243. $[cdefine HAVE_CGGL]
  244. /* Define if we have CGDX8 installed. */
  245. $[cdefine HAVE_CGDX8]
  246. /* Define if we have CGDX9 installed. */
  247. $[cdefine HAVE_CGDX9]
  248. /* Define if we have CGDX10 installed. */
  249. $[cdefine HAVE_CGDX10]
  250. /* Define if we have zlib installed. */
  251. $[cdefine HAVE_ZLIB]
  252. /* Define if we have OpenGL installed and want to build for GL. */
  253. $[cdefine HAVE_GL]
  254. $[cdefine HAVE_GLU]
  255. #if HAVE_GL
  256. # define MIN_GL_VERSION_MAJOR $[word 1,$[MIN_GL_VERSION]]
  257. # define MIN_GL_VERSION_MINOR $[word 2,$[MIN_GL_VERSION]]
  258. #endif
  259. /* Define if we have OpenCV installed and want to build for OpenCV. */
  260. $[cdefine HAVE_OPENCV]
  261. /* Define if we have FFMPEG installed and want to build for FFMPEG. */
  262. $[cdefine HAVE_FFMPEG]
  263. /* Define if we have ODE installed and want to build for ODE. */
  264. $[cdefine HAVE_ODE]
  265. /* Define if we have Mesa installed and want to build mesadisplay. */
  266. $[cdefine HAVE_MESA]
  267. $[cdefine MESA_MGL]
  268. #if HAVE_MESA
  269. # define MIN_MESA_VERSION_MAJOR $[word 1,$[MIN_MESA_VERSION]]
  270. # define MIN_MESA_VERSION_MINOR $[word 2,$[MIN_MESA_VERSION]]
  271. #endif
  272. /* Define if we have GLX installed and want to build for GLX. */
  273. $[cdefine HAVE_GLX]
  274. /* Define if we have Windows-GL installed and want to build for Wgl. */
  275. $[cdefine HAVE_WGL]
  276. /* Define if we have DirectX installed and want to build for DX. */
  277. $[cdefine HAVE_DX8]
  278. /* Define if we have DirectX installed and want to build for DX. */
  279. $[cdefine HAVE_DX9]
  280. /* Define if we want to build tinydisplay. */
  281. $[cdefine HAVE_TINYDISPLAY]
  282. /* Define if we have the SDL library. */
  283. $[cdefine HAVE_SDL]
  284. /* Define if we have X11. */
  285. $[cdefine HAVE_X11]
  286. /* Define if we want to compile the threading code. */
  287. $[cdefine HAVE_THREADS]
  288. /* Define if we want to use fast, user-space simulated threads. */
  289. $[cdefine SIMPLE_THREADS]
  290. /* Define to enable deadlock detection, mutex recursion checks, etc. */
  291. $[cdefine DEBUG_THREADS]
  292. /* Define to implement mutexes and condition variables via a user-space spinlock. */
  293. $[cdefine MUTEX_SPINLOCK]
  294. /* Define to enable the PandaFileStream implementation of pfstream etc. */
  295. $[cdefine USE_PANDAFILESTREAM]
  296. /* Define if we want to compile the net code. */
  297. $[cdefine HAVE_NET]
  298. /* Define if we want to compile the audio code. */
  299. $[cdefine HAVE_AUDIO]
  300. /* Define if we have bison and flex available. */
  301. $[cdefine HAVE_BISON]
  302. /* Define if we want to use PStats. */
  303. $[cdefine DO_PSTATS]
  304. /* Define if we want to type-check downcasts. */
  305. $[cdefine DO_DCAST]
  306. /* Define if we want to provide collision system recording and
  307. visualization tools. */
  308. $[cdefine DO_COLLISION_RECORDING]
  309. /* Define if we want to enable track-memory-usage. */
  310. $[cdefine DO_MEMORY_USAGE]
  311. /* Define if we want to enable min-lag and max-lag. */
  312. $[cdefine SIMULATE_NETWORK_DELAY]
  313. /* Define if we want to allow immediate mode OpenGL rendering. */
  314. $[cdefine SUPPORT_IMMEDIATE_MODE]
  315. /* Define if we want to compile in support for pipelining. */
  316. $[cdefine DO_PIPELINING]
  317. /* Define if we want to keep Notify debug messages around, or undefine
  318. to compile them out. */
  319. $[cdefine NOTIFY_DEBUG]
  320. /* Define if we want to export template classes from the DLL. Only
  321. makes sense to MSVC++. */
  322. $[cdefine EXPORT_TEMPLATES]
  323. /* The compiled-in character(s) to expect to separate different
  324. components of a path list (e.g. $PRC_PATH). */
  325. # define DEFAULT_PATHSEP "$[DEFAULT_PATHSEP]"
  326. /* Many of the prc variables are exported by
  327. dtool/src/prc/prc_parameters.h.pp, instead of here. Only those prc
  328. variables that must be visible outside of the prc directory are
  329. exported here. */
  330. /* The filename that specifies the public keys to import into
  331. config. */
  332. # define PRC_PUBLIC_KEYS_FILENAME "$[unixfilename $[PRC_PUBLIC_KEYS_FILENAME]]"
  333. #if $[PRC_PUBLIC_KEYS_FILENAME]
  334. # define PRC_PUBLIC_KEYS_INCLUDE "$[osfilename $[PRC_PUBLIC_KEYS_FILENAME]]"
  335. #endif
  336. /* Define if you want to save the descriptions for ConfigVariables. */
  337. $[cdefine PRC_SAVE_DESCRIPTIONS]
  338. /* Define if your processor stores words with the most significant
  339. byte first (like Motorola and SPARC, unlike Intel and VAX). */
  340. $[cdefine WORDS_BIGENDIAN]
  341. /* Define if the C++ compiler uses namespaces. */
  342. $[cdefine HAVE_NAMESPACE]
  343. /* Define if fstream::open() accepts a third parameter for umask. */
  344. $[cdefine HAVE_OPEN_MASK]
  345. /* Define if some header file defines wchar_t. */
  346. $[cdefine HAVE_WCHAR_T]
  347. /* Define if the <string> header file defines wstring. */
  348. $[cdefine HAVE_WSTRING]
  349. /* Define if the C++ compiler supports the typename keyword. */
  350. $[cdefine HAVE_TYPENAME]
  351. /* Define if we can trust the compiler not to insert extra bytes in
  352. structs between base structs and derived structs. */
  353. $[cdefine SIMPLE_STRUCT_POINTERS]
  354. /* Define if we have Dinkumware STL installed. */
  355. $[cdefine HAVE_DINKUM]
  356. /* Define if we have STL hash_map etc. available */
  357. $[cdefine HAVE_STL_HASH]
  358. /* Define if we have a gettimeofday() function. */
  359. $[cdefine HAVE_GETTIMEOFDAY]
  360. /* Define if gettimeofday() takes only one parameter. */
  361. $[cdefine GETTIMEOFDAY_ONE_PARAM]
  362. /* Define if you have the getopt function. */
  363. $[cdefine HAVE_GETOPT]
  364. /* Define if you have the getopt_long_only function. */
  365. $[cdefine HAVE_GETOPT_LONG_ONLY]
  366. /* Define if getopt appears in getopt.h. */
  367. $[cdefine HAVE_GETOPT_H]
  368. /* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
  369. $[cdefine IOCTL_TERMINAL_WIDTH]
  370. /* Do the system headers define a "streamsize" typedef? */
  371. $[cdefine HAVE_STREAMSIZE]
  372. /* Do the system headers define key ios typedefs like ios::openmode
  373. and ios::fmtflags? */
  374. $[cdefine HAVE_IOS_TYPEDEFS]
  375. /* Define if the C++ iostream library defines ios::binary. */
  376. $[cdefine HAVE_IOS_BINARY]
  377. /* Can we safely call getenv() at static init time? */
  378. $[cdefine STATIC_INIT_GETENV]
  379. /* Can we read the file /proc/self/environ to determine our
  380. environment variables at static init time? */
  381. $[cdefine HAVE_PROC_SELF_ENVIRON]
  382. /* Do we have a global pair of argc/argv variables that we can read at
  383. static init time? Should we prototype them? What are they called? */
  384. $[cdefine HAVE_GLOBAL_ARGV]
  385. $[cdefine PROTOTYPE_GLOBAL_ARGV]
  386. $[cdefine GLOBAL_ARGV]
  387. $[cdefine GLOBAL_ARGC]
  388. /* Can we read the file /proc/self/cmdline to determine our
  389. command-line arguments at static init time? */
  390. $[cdefine HAVE_PROC_SELF_CMDLINE]
  391. /* Define if you have the <io.h> header file. */
  392. $[cdefine HAVE_IO_H]
  393. /* Define if you have the <iostream> header file. */
  394. $[cdefine HAVE_IOSTREAM]
  395. /* Define if you have the <malloc.h> header file. */
  396. $[cdefine HAVE_MALLOC_H]
  397. /* Define if you have the <sys/malloc.h> header file. */
  398. $[cdefine HAVE_SYS_MALLOC_H]
  399. /* Define if you have the <alloca.h> header file. */
  400. $[cdefine HAVE_ALLOCA_H]
  401. /* Define if you have the <locale.h> header file. */
  402. $[cdefine HAVE_LOCALE_H]
  403. /* Define if you have the <string.h> header file. */
  404. $[cdefine HAVE_STRING_H]
  405. /* Define if you have the <stdlib.h> header file. */
  406. $[cdefine HAVE_STDLIB_H]
  407. /* Define if you have the <limits.h> header file. */
  408. $[cdefine HAVE_LIMITS_H]
  409. /* Define if you have the <minmax.h> header file. */
  410. $[cdefine HAVE_MINMAX_H]
  411. /* Define if you have the <sstream> header file. */
  412. $[cdefine HAVE_SSTREAM]
  413. /* Define if you have the <new> header file. */
  414. $[cdefine HAVE_NEW]
  415. /* Define if you have the <sys/types.h> header file. */
  416. $[cdefine HAVE_SYS_TYPES_H]
  417. /* Define if you have the <sys/time.h> header file. */
  418. $[cdefine HAVE_SYS_TIME_H]
  419. /* Define if you have the <unistd.h> header file. */
  420. $[cdefine HAVE_UNISTD_H]
  421. /* Define if you have the <utime.h> header file. */
  422. $[cdefine HAVE_UTIME_H]
  423. /* Define if you have the <glob.h> header file. */
  424. $[cdefine HAVE_GLOB_H]
  425. /* Define if you have the <dirent.h> header file. */
  426. $[cdefine HAVE_DIRENT_H]
  427. /* Define if you have the <drfftw.h> header file. */
  428. $[cdefine HAVE_DRFFTW_H]
  429. /* Do we have <sys/soundcard.h> (and presumably a Linux-style audio
  430. interface)? */
  431. $[cdefine HAVE_SYS_SOUNDCARD_H]
  432. /* Do we have <ucontext.h> (and therefore makecontext() /
  433. swapcontext())? */
  434. $[cdefine HAVE_UCONTEXT_H]
  435. /* Do we have RTTI (and <typeinfo>)? */
  436. $[cdefine HAVE_RTTI]
  437. /* Do we have Posix threads? */
  438. $[cdefine HAVE_POSIX_THREADS]
  439. /* Is the code being compiled with the Tau profiler's instrumentor? */
  440. $[cdefine USE_TAU]
  441. /* Define if needed to have 64-bit file i/o */
  442. $[cdefine __USE_LARGEFILE64]
  443. /* Which memory allocation scheme should we use? */
  444. #define USE_MEMORY_DLMALLOC
  445. #define USE_MEMORY_PTMALLOC2
  446. #define USE_MEMORY_MALLOC
  447. #define USE_MEMORY_NOWRAPPERS
  448. #if $[ALTERNATIVE_MALLOC]
  449. #if $[and $[WIN32_PLATFORM], $[HAVE_THREADS], $[not $[SIMPLE_THREADS]]]
  450. // A fast thread-safe alternative implementation, but which only
  451. // seems to be a good choice on Windows. (It crashes on Linux and
  452. // isn't thread-safe on OSX).
  453. #set USE_MEMORY_PTMALLOC2 1
  454. #else
  455. // A faster, but non-thread-safe, alternative implementation.
  456. // When threading support is compiled in, we use a global mutex to
  457. // protect it.
  458. #set USE_MEMORY_DLMALLOC 1
  459. #endif
  460. #else
  461. #if $[DO_MEMORY_USAGE]
  462. // Redefine new and delete to malloc(), and also provide hooks for
  463. // the benefit of the MemoryUsage class.
  464. #set USE_MEMORY_MALLOC 1
  465. #else
  466. // Don't redefine new and delete at all.
  467. #set USE_MEMORY_NOWRAPPERS 1
  468. #endif
  469. #endif
  470. $[cdefine USE_MEMORY_DLMALLOC]
  471. $[cdefine USE_MEMORY_PTMALLOC2]
  472. $[cdefine USE_MEMORY_MALLOC]
  473. $[cdefine USE_MEMORY_NOWRAPPERS]
  474. // If we are to build the native net interfaces.
  475. $[cdefine WANT_NATIVE_NET]
  476. /* Turn off warnings for using scanf and such */
  477. #if $[eq $[USE_COMPILER],MSVC9]
  478. #print Will ignore CRT_SECURE warnings for MSVC9
  479. $[cdefine _CRT_SECURE_NO_WARNINGS]
  480. # pragma warning( disable : 4996 4275 )
  481. #endif
  482. /* Can we define a modern-style STL allocator? */
  483. $[cdefine USE_STL_ALLOCATOR]
  484. /* Static linkage instead of the normal dynamic linkage? */
  485. $[cdefine LINK_ALL_STATIC]
  486. /* Platform-identifying defines. */
  487. $[cdefine IS_OSX]
  488. $[cdefine IS_LINUX]
  489. $[cdefine IS_FREEBSD]
  490. $[cdefine BUILD_IPHONE]
  491. #end dtool_config.h