Config.pp 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. //
  2. // Config.pp
  3. //
  4. // This file defines certain configuration variables that are written
  5. // into the various make scripts. It is processed by ppremake (along
  6. // with the Sources.pp files in each of the various directories) to
  7. // generate build scripts appropriate to each environment.
  8. //
  9. // ppremake is capable of generating generic Unix autoconf/automake
  10. // style build scripts, as well as makefiles customized for SGI's
  11. // MipsPRO compiler or for Microsoft's Visual C++. It can also
  12. // generate Microsoft Developer's Studio project files directly. In
  13. // principle, it can be extended to generate suitable build script
  14. // files for any number of different build environments.
  15. //
  16. // All of these build scripts can be tuned for a particular
  17. // environment via this file. This is the place for the user to
  18. // specify which external packages are installed and where, or to
  19. // enable or disable certain optional features. However, it is
  20. // suggested that rather than modify this file directly, you create a
  21. // custom file in your home directory and there redefine whatever
  22. // variables are appropriate, and set the environment variable
  23. // PPREMAKE_CONFIG to refer to it. In this way, you can easily get an
  24. // updated source tree (including a new Config.pp) without risking
  25. // accidentally losing your customizations. This also avoids having
  26. // to redefine the same variables in different packages (for instance,
  27. // in dtool and in panda).
  28. //
  29. // The syntax in this file resembles some hybrid between C++
  30. // preprocessor declarations and GNU make variables. This is the same
  31. // syntax used in the various ppremake system configure files; it's
  32. // designed to be easy to use as a macro language to generate
  33. // makefiles and their ilk.
  34. //
  35. // What kind of build scripts are we generating? This selects a
  36. // suitable template file from the ppremake system files. The
  37. // allowable choices, at present, are:
  38. //
  39. // autoconf - Generate configure.in and a series of Makefile.am files,
  40. // suitable for using with autoconf/automake. Not quite
  41. // there yet.
  42. // stopgap - Generate original Cary-style Makefile/Makefile.install/etc.
  43. // files, to ease transition to the new system.
  44. //
  45. #define BUILD_TYPE stopgap
  46. // Define the directory in which the system ppremake files are
  47. // installed.
  48. #define PPREMAKE_DIR /usr/local/panda/share
  49. // In which directory should this package be installed when you type
  50. // "make install"? This has no meaning when BUILD_TYPE is "stopgap".
  51. #define INSTALL_DIR /usr/local/panda
  52. // What level of compiler optimization/debug symbols should we build?
  53. // The various optimize levels are defined as follows:
  54. //
  55. // 1 - No compiler optimizations, full debug symbols
  56. // 2 - Full compiler optimizations, full debug symbols
  57. // (if the compiler supports this)
  58. // 3 - Full compiler optimizations, no debug symbols
  59. // 4 - Full optimizations, no debug symbols, and asserts removed
  60. //
  61. // Setting this has no effect when BUILD_TYPE is "stopgap". In this
  62. // case, the compiler optimizations are selected by setting the
  63. // environment variable OPTIMIZE accordingly at compile time.
  64. #define OPTIMIZE 1
  65. ////////////////////////////////////////////////////////////////////
  66. // The remaining variables are considered only if BUILD_TYPE is not
  67. // "autoconf". (Autoconf can determine these directly.)
  68. ////////////////////////////////////////////////////////////////////
  69. // NOTE: In the following, to indicate "yes" to a yes/no question,
  70. // define the variable to be a nonempty string. To indicate "no",
  71. // define the variable to be an empty string.
  72. // Many of the HAVE_* variables are defined in terms of expressions
  73. // based on the paths and library names, etc., defined above. These
  74. // are defined using the "defer" command, so that they are not
  75. // evaluated right away, giving the user an opportunity to redefine
  76. // the variables they depend on, or to redefine the HAVE_* variables
  77. // themselves (you can explicitly define a HAVE_* variable to some
  78. // nonempty string to force the package to be marked as installed).
  79. // Is Python installed, and should Python interfaces be generated? If
  80. // Python is installed, which directory is it in? (If the directory
  81. // is someplace standard like /usr/include, you may leave it blank.)
  82. #define PYTHON_IPATH /usr/local/include/python1.6
  83. #define PYTHON_LPATH
  84. #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
  85. // Is NSPR installed, and where?
  86. #define NSPR_IPATH /usr/local/mozilla/dist/*/include
  87. #define NSPR_LPATH
  88. #define NSPR_LIBS nspr3
  89. #defer HAVE_NSPR $[libtest $[NSPR_LPATH],$[NSPR_LIBS]]
  90. // Is VRPN installed, and where?
  91. #define VRPN_IPATH
  92. #define VRPN_LPATH
  93. #defer HAVE_VRPN $[isdir $[VRPN_IPATH]]
  94. // Is ZLIB installed, and where?
  95. #define ZLIB_IPATH
  96. #define ZLIB_LPATH
  97. #define ZLIB_LIBS z
  98. #defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]]
  99. // Is the sox libst library installed, and where?
  100. #define SOXST_IPATH
  101. #define SOXST_LPATH
  102. #define SOXST_LIBS st
  103. #defer HAVE_SOXST $[libtest $[SOXST_LPATH],$[SOXST_LIBS]]
  104. // Is OpenGL installed, and where? This should include libGL as well
  105. // as libGLU, if they are in different places.
  106. #define GL_IPATH
  107. #define GL_LPATH
  108. #if $[eq $[PLATFORM],Win32]
  109. #define GL_LIBS \
  110. opengl32.lib glu32.lib winmm.lib kernel32.lib \
  111. oldnames.lib mswsock.lib ws2_32.lib \
  112. advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib
  113. #else
  114. #define GL_LIBS GL GLU
  115. #endif
  116. #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
  117. // How about GLX?
  118. #define GLX_IPATH
  119. #define GLX_LPATH
  120. #if $[eq $[PLATFORM],Win32]
  121. #defer HAVE_GLX
  122. #else
  123. #defer HAVE_GLX $[HAVE_GL]
  124. #endif
  125. // Glut?
  126. #define GLUT_IPATH
  127. #define GLUT_LPATH
  128. #define GLUT_LIBS glut
  129. #defer HAVE_GLUT $[libtest $[GLUT_LPATH],$[GLUT_LIBS]]
  130. // Should we try to build the WGL interface?
  131. #define HAVE_WGL
  132. // Should we try to build the SGI-specific glxdisplay?
  133. #define HAVE_SGIGL
  134. // Should we try to build the DirectX interface? What additional
  135. // libraries do we need?
  136. #define DX_IPATH
  137. #define DX_LPATH
  138. #if $[eq $[PLATFORM],Win32]
  139. #define DX_LIBS \
  140. dxguid.lib winmm.lib kernel32.lib gdi32.lib comdlg32.lib winspool.lib \
  141. user32.lib advapi32.lib ddraw.lib d3dim.lib
  142. #else
  143. #define DX_LIBS
  144. #endif
  145. #defer HAVE_DX $[libtest $[DX_LPATH],$[DX_LIBS]]
  146. // Do you want to build the Renderman interface?
  147. #define HAVE_RIB
  148. // Is Mikmod installed? How should we run the libmikmod-config program?
  149. #define MIKMOD_CONFIG libmikmod-config
  150. #defer HAVE_MIKMOD $[bintest $[MIKMOD_CONFIG]]
  151. // Do you want to build the network interface? What additional libraries
  152. // are required?
  153. #define NET_IPATH
  154. #define NET_LPATH
  155. #if $[eq $[PLATFORM],Win32]
  156. #define NET_LIBS ws2_32.lib
  157. #else
  158. #define NET_LIBS
  159. #endif
  160. #define HAVE_NET 1
  161. // Do you want to build the audio interface? What additional
  162. // libraries are required?
  163. #define AUDIO_IPATH
  164. #define AUDIO_LPATH
  165. #if $[eq $[PLATFORM],Win32]
  166. #define AUDIO_LIBS winmm.lib dsound.lib user32.lib ole32.lib dxguid.lib
  167. #else
  168. #define AUDIO_LIBS
  169. #endif
  170. #define HAVE_AUDIO 1
  171. // Is Gtk-- installed? How should we run the gtkmm-config program?
  172. // This matters only to programs in PANDATOOL.
  173. #define GTKMM_CONFIG gtkmm-config
  174. #defer HAVE_GTKMM $[bintest $[GTKMM_CONFIG]]
  175. // Is Maya installed? This matters only to programs in PANDATOOL.
  176. #define MAYA_LOCATION /usr/aw/maya2.5
  177. #defer HAVE_MAYA $[isdir $[MAYA_LOCATION]]
  178. //////////////////////////////////////////////////////////////////////
  179. // There are also some additional variables that control specific
  180. // compiler/platform features or characteristics, defined in the
  181. // platform specific file Config.platform.pp. Be sure to inspect
  182. // these variables for correctness too. As above, these are
  183. // unnecessary when BUILD_TYPE is "autoconf".
  184. //////////////////////////////////////////////////////////////////////