LocalSetup.pp 14 KB

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