LocalSetup.pp 15 KB

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