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.
 
 
 
 
 
 

378 lines
12 KiB

  1. AC_INIT([libburn], [1.5.3], [http://libburnia-project.org])
  2. AC_PREREQ([2.50])
  3. dnl AC_CONFIG_HEADER([config.h])
  4. AC_CANONICAL_HOST
  5. AC_CANONICAL_TARGET
  6. LIBBURNIA_SET_FLAGS
  7. AM_INIT_AUTOMAKE([subdir-objects])
  8. AC_CONFIG_MACRO_DIR([./])
  9. dnl Notes about version numbers and .so numbers:
  10. dnl
  11. dnl Regrettably the meaning of the various version types was misunderstood
  12. dnl before version 0.4.1.
  13. dnl
  14. dnl In the past MAJOR.MINOR.MICRO versions led to the following SONAME numbers:
  15. dnl 0.2.2 = 2 , 0.2.3 = 3 , 0.2.6 = 6
  16. dnl 0.3.0 = 0 , 0.3.2 = 2 , 0.3.4 = 4 . 0.3.6 = 6 , 0.3.8 = 4
  17. dnl 0.4.0 = 0 (also released as SONAME 4)
  18. dnl
  19. dnl Meanwhile the following schemes are maintained in parallel:
  20. dnl
  21. dnl BURN_MAJOR_VERSION , BURN_MINOR_VERSION , BURN_MICRO_VERSION
  22. dnl are three small non-negative integers which describe the evolution
  23. dnl steps of the library.
  24. dnl Older applications are able to use younger libraries over
  25. dnl quite a long range of such steps. Some day, nevertheless,
  26. dnl compatibility might get terminated, after due notice.
  27. dnl
  28. dnl SONAME (libburn.so.4)
  29. dnl is a small positive integer which marks a family of compatible
  30. dnl evolution steps. Libraries with a particular SONAME allow a binary
  31. dnl with the same SONAME to start up. Any further compatibility check is to
  32. dnl be done by own runtime means. Especially *_version() calls in the API
  33. dnl which return BURN_MAJOR_VERSION, BURN_MINOR_VERSION, BURN_MICRO_VERSION.
  34. dnl See below.
  35. dnl
  36. dnl CURRENT, AGE, REVISION
  37. dnl are three integers used by libtool. CURRENT is positive, the others
  38. dnl non-negative. The use at runtime is not known yet. But libtool computes
  39. dnl at build time SONAME = CURRENT - AGE.
  40. dnl So this is a superspace of the SONAME version space. To avoid
  41. dnl ill SONAME, the value of CURRENT must be larger than AGE.
  42. dnl See also http://www.gnu.org/software/libtool/manual.html#Interfaces
  43. dnl
  44. dnl On Linux the name of the dynamic library will be
  45. dnl libburn.so.$SONAME.$AGE.$REV
  46. dnl In the terminology of this file:
  47. dnl CURRENT = LT_CURRENT
  48. dnl AGE = LT_AGE
  49. dnl REVISION= LT_REVISION
  50. dnl
  51. dnl Beginning with libburn-0.4.1 a rectified counting was introduced as
  52. dnl CURRENT=10, REVISION=1, AGE=6
  53. dnl This rectification declared that version to be binary compatible up
  54. dnl from libburn-0.3.4.
  55. dnl Real compatibility was given since libburn-0.3.2.
  56. dnl Beware of libburn-0.2.6 which had SONAME=6 and is not binary compatible.
  57. dnl Applications for libburn-0.2 to libburn-0.3.1 need recompilation but no
  58. dnl source code changes.
  59. dnl
  60. dnl Neatly versioned stable releases meanwhile:
  61. dnl 0.4.2 = libburn.so.4.7.0
  62. dnl 0.4.4 = libburn.so.4.9.0
  63. dnl 0.4.6 = libburn.so.4.11.0
  64. dnl 0.4.8 = libburn.so.4.13.0
  65. dnl 0.5.0 = libburn.so.4.15.0
  66. dnl 0.5.2 = libburn.so.4.17.0
  67. dnl 0.5.4 = libburn.so.4.19.0
  68. dnl 0.5.6 = libburn.so.4.21.0
  69. dnl 0.5.8 = libburn.so.4.23.0
  70. dnl 0.6.0 = libburn.so.4.25.0
  71. dnl 0.6.2 = libburn.so.4.27.0
  72. dnl 0.6.4 = libburn.so.4.29.0
  73. dnl 0.6.6 = libburn.so.4.31.0
  74. dnl 0.6.8 = libburn.so.4.33.0
  75. dnl 0.7.0 = libburn.so.4.35.0
  76. dnl 0.7.2 = libburn.so.4.37.0
  77. dnl 0.7.4 = libburn.so.4.39.0
  78. dnl 0.7.6 = libburn.so.4.41.0
  79. dnl 0.7.8 = libburn.so.4.43.0
  80. dnl 0.8.0 = libburn.so.4.45.0
  81. dnl 0.8.2 = libburn.so.4.47.0
  82. dnl 0.8.4 = libburn.so.4.49.0
  83. dnl 0.8.6 = libburn.so.4.51.0
  84. dnl 0.8.8 = libburn.so.4.53.0
  85. dnl 0.9.0 = libburn.so.4.55.0
  86. dnl 1.0.0 = libburn.so.4.57.0
  87. dnl 1.0.2 = libburn.so.4.59.0
  88. dnl 1.0.4 = libburn.so.4.61.0
  89. dnl 1.0.6 = libburn.so.4.63.0
  90. dnl 1.1.0 = libburn.so.4.65.0
  91. dnl 1.1.4 = libburn.so.4.67.0
  92. dnl 1.1.6 = libburn.so.4.69.0
  93. dnl 1.1.8 = libburn.so.4.71.0
  94. dnl 1.2.0 = libburn.so.4.73.0
  95. dnl 1.2.2 = libburn.so.4.75.0
  96. dnl 1.2.4 = libburn.so.4.77.0
  97. dnl 1.2.6 = libburn.so.4.79.0
  98. dnl 1.2.8 = libburn.so.4.81.0
  99. dnl 1.3.0 = libburn.so.4.83.0
  100. dnl 1.3.2 = libburn.so.4.85.0
  101. dnl 1.3.4 = libburn.so.4.87.0
  102. dnl 1.3.6 = libburn.so.4.89.0
  103. dnl 1.3.8 = libburn.so.4.91.0
  104. dnl 1.4.0 = libburn.so.4.93.0
  105. dnl 1.4.2 = libburn.so.4.95.0
  106. dnl 1.4.4 = libburn.so.4.97.0
  107. dnl 1.4.6 = libburn.so.4.99.0
  108. dnl 1.4.8 = libburn.so.4.101.0
  109. dnl 1.5.0 = libburn.so.4.103.0
  110. dnl 1.5.2 = libburn.so.4.105.0
  111. dnl
  112. dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
  113. dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
  114. dnl The linker will do no finer checks. Especially no age range check for
  115. dnl the application binary. If SONAME matches, then the couple starts.
  116. dnl
  117. dnl Therefore at run time info is provided by libburn function burn_version().
  118. dnl It returns the major, minor and micro revision of the library.
  119. dnl Before using any API feature, a program should check for age.
  120. dnl
  121. dnl The variables BURN_*_VERSION are mere copies for informing libtool.
  122. dnl The true values which get issued and should be compared are macros
  123. dnl defined in libburn/libburn.h .
  124. dnl
  125. dnl Normally one can allow a program to run with a library which passed the
  126. dnl linker SONAME test and which is not older than the library it was
  127. dnl developed for. Library2 is younger than library1 if:
  128. dnl major2>major1 || (major2==major1 &&
  129. dnl (minor2>minor1 || (minor2==minor1 && micro2 > micro1)))
  130. dnl
  131. dnl If BURN_*_VERSION changes, be sure to change AC_INIT above to match.
  132. dnl
  133. dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
  134. BURN_MAJOR_VERSION=1
  135. BURN_MINOR_VERSION=5
  136. BURN_MICRO_VERSION=3
  137. BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
  138. AC_SUBST(BURN_MAJOR_VERSION)
  139. AC_SUBST(BURN_MINOR_VERSION)
  140. AC_SUBST(BURN_MICRO_VERSION)
  141. AC_SUBST(BURN_VERSION)
  142. dnl Libtool versioning
  143. LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
  144. dnl
  145. dnl ### This is the release version libburn-1.5.2
  146. dnl This is the development version after above release version
  147. dnl ### LT_CURRENT++, LT_AGE++ has not yet happened.
  148. dnl LT_CURRENT++, LT_AGE++ has happened meanwhile.
  149. dnl
  150. dnl SONAME = 110 - 106 = 4 . Linux library name = libburn.so.4.106.0
  151. LT_CURRENT=110
  152. LT_AGE=106
  153. LT_REVISION=0
  154. LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
  155. AC_SUBST(LT_RELEASE)
  156. AC_SUBST(LT_CURRENT)
  157. AC_SUBST(LT_REVISION)
  158. AC_SUBST(LT_AGE)
  159. AC_SUBST(LT_CURRENT_MINUS_AGE)
  160. dnl ts A71207: This is done only not to break any old components
  161. BURN_INTERFACE_AGE=$LT_REVISION
  162. BURN_BINARY_AGE=`expr $LT_AGE + $BURN_INTERFACE_AGE`
  163. AC_SUBST(BURN_INTERFACE_AGE)
  164. AC_SUBST(BURN_BINARY_AGE)
  165. AC_PREFIX_DEFAULT([/usr/local])
  166. test "$prefix" = "NONE" && prefix=$ac_default_prefix
  167. dnl ts B90405 : Disabled on advise of Ross Burton
  168. dnl AM_MAINTAINER_MODE
  169. AM_PROG_CC_C_O
  170. AC_C_CONST
  171. AC_C_INLINE
  172. AC_C_BIGENDIAN
  173. dnl Large file support
  174. AC_SYS_LARGEFILE
  175. AC_FUNC_FSEEKO
  176. AC_CHECK_FUNC([fseeko])
  177. if test ! $ac_cv_func_fseeko; then
  178. AC_ERROR([Libburn requires largefile support.])
  179. fi
  180. AC_PROG_LIBTOOL
  181. AC_SUBST(LIBTOOL_DEPS)
  182. # LIBTOOL="$LIBTOOL --silent"
  183. AC_PROG_INSTALL
  184. AC_CHECK_HEADERS()
  185. THREAD_LIBS=-lpthread
  186. AC_SUBST(THREAD_LIBS)
  187. TARGET_SHIZZLE
  188. AC_SUBST(ARCH)
  189. AC_SUBST(LIBBURNIA_PKGCONFDIR)
  190. AC_SUBST(LIBBURN_ARCH_LIBS)
  191. dnl ts A90303
  192. dnl Check the preconditions for using statvfs() in sg-dummy
  193. dnl (sg-linux and sg-freebsd use statvfs() unconditionally)
  194. STATVFS_DEF=-DLibburn_os_has_statvfS
  195. AC_CHECK_HEADER(sys/statvfs.h, X=, STATVFS_DEF=)
  196. AC_CHECK_FUNC([statvfs], X=, STATVFS_DEF=)
  197. dnl If this would be done more specifically in Makefile.am
  198. dnl via libburn_libburn_la_CFLAGS then undesired .o file names would emerge
  199. CFLAGS="$STATVFS_DEF $CFLAGS"
  200. dnl ts A91122
  201. AC_ARG_ENABLE(track-src-odirect,
  202. [ --enable-track-src-odirect Banned for now: (Enable use of O_DIRECT with track input, default=no)],
  203. , enable_track_src_odirect=no)
  204. if test x$enable_track_src_odirect = xyes; then
  205. # LIBBURN_O_DIRECT_DEF="-DLibburn_read_o_direcT"
  206. # echo "enabled use of O_DIRECT with track input"
  207. echo "REFUSED to enable use of O_DIRECT with track input because of cdrskin multi-track bug"
  208. else
  209. LIBBURN_O_DIRECT_DEF=
  210. echo "disabled use of O_DIRECT with track input"
  211. fi
  212. dnl Avoid the need for libburn_libburn_la_CFLAGS in Makefile.am (ugly .o names)
  213. dnl ### AC_SUBST(LIBBURN_O_DIRECT_DEF)
  214. CFLAGS="$LIBBURN_O_DIRECT_DEF $CFLAGS"
  215. dnl ts A91116
  216. AC_ARG_ENABLE(dvd-obs-64k,
  217. [ --enable-dvd-obs-64k 64 KB default size for DVD writing, default=no],
  218. , enable_dvd_obs_64k=no)
  219. if test x$enable_dvd_obs_64k = xyes; then
  220. LIBBURN_DVD_OBS_64K="-DLibburn_dvd_obs_default_64K"
  221. echo "enabled write size default 64 KB on DVD"
  222. else
  223. LIBBURN_DVD_OBS_64K=
  224. echo "disabled write size default 64 KB on DVD"
  225. fi
  226. CFLAGS="$LIBBURN_DVD_OBS_64K $CFLAGS"
  227. dnl ts B20413
  228. AC_ARG_ENABLE(dvd-obs-pad,
  229. [ --enable-dvd-obs-pad pad DVD DAO sessions to 32 or 64 KB, default=no],
  230. , enable_dvd_obs_pad=no)
  231. if test x$enable_dvd_obs_pad = xyes; then
  232. LIBBURN_DVD_OBS_PAD="-DLibburn_dvd_always_obs_paD"
  233. echo "enabled padding of DVD DAO sessions to 32 or 64 KB"
  234. else
  235. LIBBURN_DVD_OBS_64K=
  236. echo "disabled padding of DVD DAO sessions to 32 or 64 KB"
  237. fi
  238. CFLAGS="$LIBBURN_DVD_OBS_PAD $CFLAGS"
  239. dnl ts A91218 - B21002
  240. case $host_os in
  241. cygwin*|mingw*)
  242. default_libcdio=yes
  243. ;;
  244. *)
  245. default_libcdio=no
  246. ;;
  247. esac
  248. # Check for proper library versions if this is desired.
  249. # (It fails too often on too many systems.)
  250. AC_ARG_ENABLE(pkg-check-modules,
  251. [ --enable-pkg-check-modules Enable pkg-config check for libcdio , default=no],
  252. , enable_pkg_check_modules=no)
  253. AC_ARG_ENABLE(libcdio,
  254. [ --enable-libcdio Enable use of libcdio as system adapter, default=no (except on MSWindows)],
  255. , enable_libcdio=$default_libcdio)
  256. PKG_PROG_PKG_CONFIG
  257. if test x$enable_libcdio = xyes; then
  258. dnl Check whether there is libcdio-devel and libcdio-runtime.
  259. dnl If not, erase this macro
  260. LIBCDIO_DEF="-DLibburn_use_libcdiO"
  261. dnl The empty yes case obviously causes -lcdio to be linked
  262. AC_CHECK_HEADER(cdio/cdio.h, AC_CHECK_LIB(cdio, mmc_last_cmd_sense, , LIBCDIO_DEF= ), LIBCDIO_DEF= )
  263. else
  264. LIBCDIO_DEF=
  265. fi
  266. if test x$LIBCDIO_DEF = x
  267. then
  268. if test x$enable_libcdio = xyes
  269. then
  270. echo "WARNING: could not enable use of libcdio as system adapter"
  271. fi
  272. else
  273. echo "enabled use of libcdio as system adapter"
  274. CFLAGS="$LIBCDIO_DEF $CFLAGS"
  275. if test x$enable_pkg_check_modules = xyes; then
  276. LIBCDIO_REQUIRED=0.83
  277. PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
  278. else
  279. echo "checking for LIBCDIO... skipped, no --enable-pkg-check-modules"
  280. fi
  281. fi
  282. dnl ts B70127
  283. # There are Linuxes with no public generic SCSI interface
  284. LIBBURNIA_CHECK_LINUX_SCSI
  285. dnl ts B00704
  286. # Library versioning normally serves a complex purpose.
  287. # Since libburn obeys strict ABI backward compatibility, it needs only the
  288. # simple feature to declare function names "global:" or "local:". Only the
  289. # global ones are visible to applications at library load time.
  290. AC_ARG_ENABLE(versioned-libs,
  291. [ --enable-versioned-libs Enable strict symbol encapsulation , default=yes],
  292. , enable_versioned_libs=yes)
  293. if test x$enable_versioned_libs = xyes; then
  294. vers_libs_test=no
  295. LIBBURN_ASSERT_VERS_LIBS
  296. if test x$vers_libs_test = xno
  297. then
  298. echo "disabled strict symbol encapsulation (test failed)"
  299. else
  300. echo "enabled strict symbol encapsulation"
  301. fi
  302. else
  303. echo "disabled strict symbol encapsulation"
  304. fi
  305. # Check for system dependent mandatory libraries (LIBBURN_ARCH_LIBS)
  306. LIBBURNIA_CHECK_ARCH_LIBS(mandatory)
  307. AC_ARG_ENABLE(ldconfig-at-install,
  308. [ --enable-ldconfig-at-install On GNU/Linux run ldconfig, default=yes],
  309. , ldconfig_at_install=yes)
  310. if test x$ldconfig_at_install = xyes; then
  311. dummy=dummy
  312. else
  313. LIBBURNIA_LDCONFIG_CMD="echo 'NOTE: ldconfig is disabled. If needed, configure manually for:'"
  314. echo "disabled run of ldconfig during installation on GNU/Linux"
  315. fi
  316. AC_SUBST(LIBBURNIA_LDCONFIG_CMD)
  317. dnl Add compiler-specific flags
  318. dnl See if the user wants aggressive optimizations of the code
  319. AC_ARG_ENABLE(debug,
  320. [ --enable-debug Disable aggressive optimizations [default=yes]],
  321. , enable_debug=yes)
  322. if test x$enable_debug != xyes; then
  323. if test x$GCC = xyes; then
  324. CFLAGS="-O3 $CFLAGS"
  325. CFLAGS="-fexpensive-optimizations $CFLAGS"
  326. fi
  327. CFLAGS="-DNDEBUG $CFLAGS"
  328. else
  329. if test x$GCC = xyes; then
  330. CFLAGS="-g -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-char-subscripts $CFLAGS"
  331. fi
  332. CFLAGS="-DDEBUG $CFLAGS"
  333. fi
  334. dnl Determine target directory for libburn-*.pc
  335. dnl Important: Must be performed _after_ TARGET_SHIZZLE
  336. dnl
  337. LIBBURNIA_SET_PKGCONFIG
  338. AC_CONFIG_FILES([
  339. Makefile
  340. doc/doxygen.conf
  341. version.h
  342. libburn-1.pc
  343. ])
  344. AC_OUTPUT