jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
5.5KB

  1. ########################################################################
  2. #
  3. # configure.host -- JACK Audio Connection Kit version.
  4. #
  5. # This script and the system-dependent header directories it uses were
  6. # adapted for JACK from gcc/libstdc++-v3/configure.host.
  7. #
  8. # We've tried to keep it as close to the original as possible, while
  9. # removing a bunch of os-specific files that didn't seem relevant.
  10. # The primary goal has been to avoid changing the cpu-dependent
  11. # atomicity.h headers.
  12. #
  13. # If you need to make changes, the relevant GCC documentation may
  14. # prove helpful, <http://gcc.gnu.org/onlinedocs/porting>, especially
  15. # the <http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html>
  16. # discussion of <atomicity.h>.
  17. #
  18. ########################################################################
  19. # This shell script handles all host based configuration for libstdc++.
  20. # It sets various shell variables based on the the host and the
  21. # configuration options. You can modify this shell script without needing
  22. # to rerun autoconf/aclocal/etc. This file is "sourced" not executed.
  23. #
  24. # You should read docs/html/17_intro/porting.* to make sense of this file.
  25. #
  26. #
  27. # It uses the following shell variables as set by config.guess:
  28. # host The configuration host (full CPU-vendor-OS triplet)
  29. # host_cpu The configuration host CPU
  30. # host_os The configuration host OS
  31. #
  32. #
  33. # It sets the following shell variables:
  34. #
  35. # cpu_include_dir CPU-specific directory, defaults to cpu/generic
  36. # if cpu/host_cpu doesn't exist. This is
  37. # used to set atomicity_include_dir.
  38. #
  39. # os_include_dir OS-specific directory, defaults to os/generic.
  40. #
  41. # atomicity_include_dir location of atomicity.h,
  42. # defaults to cpu_include_dir
  43. #
  44. # It possibly modifies the following variables:
  45. #
  46. # OS_LDFLAGS extra flags to pass when linking the library, of
  47. # the form '-Wl,blah'
  48. # (defaults to empty in acinclude.m4)
  49. #
  50. # If the defaults will not work for your platform, you need only change the
  51. # variables that won't work, i.e., you do not need to explicitly set a
  52. # working variable to its default. Most hosts only need to change the two
  53. # *_include_dir variables.
  54. # DEFAULTS
  55. # Try to guess a default cpu_include_dir based on the name of the CPU. We
  56. # cannot do this for os_include_dir; there are too many portable operating
  57. # systems out there. :-)
  58. # HOST-SPECIFIC OVERRIDES
  59. # Set any CPU-dependent bits.
  60. # Here we override defaults and catch more general cases due to naming
  61. # conventions (e.g., chip_name* to catch all variants).
  62. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
  63. case "${host_cpu}" in
  64. alpha*)
  65. try_cpu=alpha
  66. ;;
  67. i[3567]86 | x86_64 | amd64)
  68. # Note that this causes us to compile i386 using i486
  69. # instructions. This is done for binary distributions, which
  70. # typically compile for i386 as the lowest common denominator.
  71. # Since JACK is unlikely to actually be used on a real i386, we
  72. # substitute i486 as our common denominator. That way the atomic
  73. # instructions work properly.
  74. try_cpu=i486
  75. ;;
  76. hppa*)
  77. try_cpu=hppa
  78. ;;
  79. mips*)
  80. # NB: cpu/mips/atomicity.h needs MIPS II or above.
  81. # Of course, there is no sane way to test for this, no ABI macro,
  82. # and no consistent host_cpu name differentiation. Therefore, only
  83. # use it where it is known to be safe, ie it runs linux (see below).
  84. try_cpu=generic
  85. ;;
  86. m680[246]0)
  87. try_cpu=m68k
  88. ;;
  89. powerpc* | rs6000)
  90. try_cpu=powerpc
  91. ;;
  92. s390x)
  93. try_cpu=s390
  94. ;;
  95. sparc* | ultrasparc)
  96. try_cpu=sparc
  97. ;;
  98. *)
  99. if test -d $srcdir/config/cpu/${host_cpu}; then
  100. try_cpu=${host_cpu}
  101. else
  102. try_cpu=generic
  103. fi
  104. ;;
  105. esac
  106. # Now look for the file(s) usually tied to a CPU model, and make
  107. # default choices for those if they haven't been explicitly set
  108. # already.
  109. cpu_include_dir="cpu/${try_cpu}"
  110. atomicity_include_dir=$cpu_include_dir
  111. # Set any OS-dependent bits.
  112. # Set the os_include_dir.
  113. # If atomic ops and/or numeric limits are OS-specific rather than
  114. # CPU-specifc, set those here too.
  115. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
  116. case "${host_os}" in
  117. aix4.[3456789]* | aix[56789]*)
  118. # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
  119. # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
  120. # explicitly duplicate the directory for 4.[<3].
  121. os_include_dir="os/aix"
  122. atomicity_include_dir="os/aix"
  123. OS_LDFLAGS="-Wl,-G"
  124. ;;
  125. aix4.*)
  126. os_include_dir="os/generic"
  127. atomicity_include_dir="os/aix"
  128. ;;
  129. aix*)
  130. os_include_dir="os/generic"
  131. atomicity_include_dir="cpu/generic"
  132. ;;
  133. gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
  134. os_include_dir="os/gnu-linux"
  135. ;;
  136. freebsd*)
  137. # current FreeBSD header files conflict with the OSS driver's
  138. # barrier code, this may be fixed in 5.3, stay tuned.
  139. os_include_dir="os/generic"
  140. USE_BARRIER="no"
  141. ;;
  142. irix*)
  143. os_include_dir="os/irix"
  144. atomicity_include_dir=$os_include_dir
  145. ;;
  146. darwin*)
  147. os_include_dir="os/macosx"
  148. JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
  149. JACK_CPP_VARARGS_BROKEN=1
  150. JACK_DO_NOT_MLOCK=1
  151. JACK_USE_MACH_THREADS=1
  152. OS_LDFLAGS="-framework CoreAudio"
  153. TRY_POSIX_SHM=yes # POSIX shm works better
  154. ;;
  155. *)
  156. os_include_dir="os/generic"
  157. ;;
  158. esac
  159. # Set any OS-dependent and CPU-dependent bits.
  160. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
  161. case "${host}" in
  162. mips*-*-linux*)
  163. atomicity_include_dir="cpu/mips"
  164. ;;
  165. esac