"Fossies" - the Fresh Open Source Software Archive 
Member "libisoburn-1.5.4/configure.ac" (30 Jan 2021, 17082 Bytes) of package /linux/misc/libisoburn-1.5.4.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the last
Fossies "Diffs" side-by-side code changes report for "configure.ac":
1.5.0_vs_1.5.2.
1 AC_INIT([libisoburn], [1.5.4], [http://libburnia-project.org])
2 AC_PREREQ([2.50])
3 dnl AC_CONFIG_HEADER([config.h])
4
5 AC_CANONICAL_HOST
6 AC_CANONICAL_TARGET
7
8 LIBBURNIA_SET_FLAGS
9
10 AM_INIT_AUTOMAKE([subdir-objects])
11 AC_CONFIG_MACRO_DIR([./])
12
13 dnl Hint: Search list for version code aspects:
14 dnl /AC_INIT(
15 dnl /ISOBURN_.*_VERSION
16 dnl /LT_.*
17 dnl /LIB.*_REQUIRED
18
19 dnl The API version codes are defined in libisoburn/libisoburn.h
20 dnl #define isoburn_header_version_*
21 dnl configure.ac only rules the libtool revision numbering about
22 dnl LT_CURREN, LT_AGE, LT_REVISION where SONAME becomes LT_CURRENT - LT_AGE
23 dnl
24 dnl These three are only copies to provide libtool with unused LT_RELEASE
25 ISOBURN_MAJOR_VERSION=1
26 ISOBURN_MINOR_VERSION=5
27 ISOBURN_MICRO_VERSION=4
28
29 dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION
30
31 AC_SUBST(ISOBURN_MAJOR_VERSION)
32 AC_SUBST(ISOBURN_MINOR_VERSION)
33 AC_SUBST(ISOBURN_MICRO_VERSION)
34 dnl AC_SUBST(ISOBURN_VERSION)
35
36 dnl Libtool versioning
37 dnl Generate libisoburn.so.1.x.y
38 dnl SONAME will become LT_CURRENT - LT_AGE
39 dnl
40 dnl ts C10130
41 dnl This is the release version 1.5.4 = libisoburn.so.1.111.0
42 dnl ### This is the development version after above stable release
43 dnl LT_CURRENT++, LT_AGE++ have not happened yet.
44 dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
45 dnl
46 dnl SONAME = 112 - 111 = 1 . Library name = libisoburn.so.1.111.0
47 LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
48 LT_CURRENT=112
49 LT_AGE=111
50 LT_REVISION=0
51 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
52
53 AC_SUBST(LT_RELEASE)
54 AC_SUBST(LT_CURRENT)
55 AC_SUBST(LT_REVISION)
56 AC_SUBST(LT_AGE)
57 AC_SUBST(LT_CURRENT_MINUS_AGE)
58
59 AC_PREFIX_DEFAULT([/usr/local])
60 test "$prefix" = "NONE" && prefix=$ac_default_prefix
61
62 dnl ts B90405 : Disabled on advise of Ross Burton
63 dnl AM_MAINTAINER_MODE
64
65 AM_PROG_CC_C_O
66 AC_C_CONST
67 AC_C_INLINE
68 AC_C_BIGENDIAN
69
70 dnl Large file support
71 AC_SYS_LARGEFILE
72 AC_FUNC_FSEEKO
73 AC_CHECK_FUNC([fseeko])
74 if test ! $ac_cv_func_fseeko; then
75 AC_ERROR([Libburn requires largefile support.])
76 fi
77
78 if test x$LIBISOBURN_OLD_ICONV_CONFIGURE = x
79 then
80
81 dnl ts B00410 : To detect the need for -liconv and const argument of iconv()
82 LIBBURNIA_CHECK_ICONV
83
84 else
85
86 dnl Outdated: produces double -liconv and warnings about parameter mismatch
87 dnl If iconv(3) is in an extra lib, then it gets added to variable LIBS.
88 dnl If not, then no -liconv will be added.
89 AC_CHECK_LIB(iconv, iconv, , )
90 dnl GNU iconv has no function iconv() but libiconv() and a macro iconv()
91 AC_CHECK_LIB(iconv, libiconv, , )
92
93 fi
94
95 AC_PROG_LIBTOOL
96 AC_SUBST(LIBTOOL_DEPS)
97 # LIBTOOL="$LIBTOOL --silent"
98
99 AC_PROG_INSTALL
100
101 AC_CHECK_HEADERS()
102
103 dnl Check for tm_gmtoff field in struct tm
104 AC_CHECK_MEMBER([struct tm.tm_gmtoff],
105 [AC_DEFINE(HAVE_TM_GMTOFF, 1,
106 [Define this if tm structure includes a tm_gmtoff entry.])],
107 ,
108 [#include <time.h>])
109
110 dnl Whether timezone is an integer variable
111 AH_TEMPLATE([Libburnia_timezonE], [Either timezone or 0])
112 LIBBURNIA_TRY_TIMEZONE
113 if test x$LIBBURNIA_TIMEZONE = xtimezone
114 then
115 AC_DEFINE([Libburnia_timezonE], [timezone])
116 else
117 AC_DEFINE([Libburnia_timezonE], [0])
118 fi
119
120 THREAD_LIBS=-lpthread
121 AC_SUBST(THREAD_LIBS)
122
123 TARGET_SHIZZLE
124 AC_SUBST(ARCH)
125 AC_SUBST(LIBBURNIA_PKGCONFDIR)
126 AC_SUBST(LIBBURN_ARCH_LIBS)
127
128 # Do not link libcam or libvolmgt if not available.
129 # (They are indirect dependency on FreeBSD or Solaris.)
130 LIBBURNIA_CHECK_ARCH_LIBS(optional)
131
132 dnl Determine target directory for libisoburn-*.pc
133 dnl Important: Must be performed _after_ TARGET_SHIZZLE
134 dnl
135 LIBBURNIA_SET_PKGCONFIG
136
137 dnl xorriso-dd-target is addicted to the Linux kernel and util-linux lsblk
138 if uname -s | grep '^Linux' >/dev/null
139 then
140 XORRISO_DD_TARGET=xorriso-dd-target/xorriso-dd-target
141 XORRISO_DD_TARGET_MAN=xorriso-dd-target/xorriso-dd-target.1
142 XORRISO_DD_TARGET_TEXI=xorriso-dd-target/xorriso-dd-target.texi
143 echo "enabled installation of xorriso-dd-target/xorriso-dd-target"
144 else
145 XORRISO_DD_TARGET=
146 XORRISO_DD_TARGET_MAN=
147 XORRISO_DD_TARGET_TEXI=
148 echo "disabled installation of xorriso-dd-target/xorriso-dd-target"
149 fi
150 AC_SUBST(XORRISO_DD_TARGET)
151 AC_SUBST(XORRISO_DD_TARGET_MAN)
152 AC_SUBST(XORRISO_DD_TARGET_TEXI)
153
154 AC_ARG_ENABLE(libreadline,
155 [ --enable-libreadline Enable use of libreadline by xorriso, default=yes],
156 , enable_libreadline=yes)
157 if test x$enable_libreadline = xyes; then
158 dnl Check whether there is readline-devel and readline-runtime.
159 dnl If not, erase this macro which would enable use of readline(),add_history()
160 READLINE_DEF="-DXorriso_with_readlinE"
161
162 if test x$XORRISO_OLD_READLINE_CONFIGURE = x
163 then
164
165 dnl ts B00411 : To disable readline if not all needed functions are present
166 LIBBURNIA_ASSERT_READLINE
167
168 else
169 dnl The empty yes case obviously causes -lreadline to be linked
170 AC_CHECK_HEADER(readline/readline.h, AC_CHECK_LIB(readline, readline, , READLINE_DEF= ), READLINE_DEF= )
171 dnl The X= in the yes case prevents that -lreadline gets linked twice
172 AC_CHECK_HEADER(readline/history.h, AC_CHECK_LIB(readline, add_history, X= , READLINE_DEF= ), READLINE_DEF= )
173 fi
174 else
175 READLINE_DEF=
176 echo "disabled libreadline"
177 fi
178 if test x$READLINE_DEF = x; then
179 if test x$enable_libreadline = xyes; then
180 libedit_deflt=yes
181 else
182 libedit_deflt=no
183 fi
184 AC_ARG_ENABLE(libedit,
185 [ --enable-libedit Enable use of libedit by xorriso if not libreadline,
186 default= setting of --enable-libreadline],
187 , enable_libedit=$libedit_deflt)
188 if test x$enable_libedit = xyes; then
189 READLINE_DEF="-DXorriso_with_editlinE"
190
191 LIBBURNIA_ASSERT_EDITLINE
192
193 else
194 READLINE_DEF=
195 echo "disabled libedit"
196 fi
197 fi
198 AC_SUBST(READLINE_DEF)
199
200
201 dnl ts A90329
202 dnl ACL and xattr do not need to be enabled in libisoburn or xorriso source
203 dnl but without AC_CHECK_LIB() xorriso will not be linked with -lacl .
204 dnl On my Linux this does work with an ACL enabled libisofs but in general
205 dnl it seems not be right.
206 dnl So for now it seems to be best to do the same configuration for libisoburn
207 dnl and xorriso as for libisofs.
208 AC_ARG_ENABLE(libacl,
209 [ --enable-libacl Enable use of libacl by libisofs, default=yes],
210 , enable_libacl=yes)
211 LIBACL_DEF=
212 if test x$LIBBURNIA_SUPP_ACL = xlibacl
213 then
214 if test x$enable_libacl = xyes; then
215 dnl Check whether there is libacl-devel and libacl-runtime.
216 dnl If not, erase this macro which would enable use of acl_to_text and others
217 LIBACL_DEF="-DLibisofs_with_aaip_acL"
218 dnl The empty yes case obviously causes -lacl to be linked
219 has_acl_h_but_no_func=0
220 AC_CHECK_HEADER(sys/acl.h, AC_CHECK_LIB(acl, acl_to_text, , has_acl_h_but_no_libacl=1 ), LIBACL_DEF= )
221 if test "$has_acl_h_but_no_libacl" = 1
222 then
223 AC_CHECK_LIB(c, acl_to_text, X= , LIBACL_DEF= )
224 fi
225 fi
226 fi
227 if test x$LIBACL_DEF = x-DLibisofs_with_aaip_acL
228 then
229 if test x$has_acl_h_but_no_libacl = x1
230 then
231 echo "enabled local processing of ACL"
232 else
233 echo "enabled libacl, local processing of ACL"
234 fi
235 else
236 echo "disabled local processing of ACL"
237 fi
238 AC_SUBST(LIBACL_DEF)
239
240
241 AC_ARG_ENABLE(xattr,
242 [ --enable-xattr Enable use of extended file attributes by libisofs, default=yes],
243 , enable_xattr=yes)
244 XATTR_DEF=
245 if test x"$LIBBURNIA_SUPP_FATTR" = xxattr
246 then
247 if test "x$enable_xattr" = xyes; then
248 dnl Check whether there is the header for Linux xattr.
249 dnl If not, erase this macro which would enable use of listxattr and others
250 XATTR_DEF="-DLibisofs_with_aaip_xattR"
251 AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
252 XATTR_DEF= ), XATTR_DEF= )
253 fi
254 elif test x"$LIBBURNIA_SUPP_FATTR" = xextattr
255 then
256 if test "x$enable_xattr" = xyes; then
257 XATTR_DEF="-DLibisofs_with_freebsd_extattR"
258 AC_CHECK_HEADER(sys/extattr.h, AC_CHECK_LIB(c, extattr_list_file, X=,
259 XATTR_DEF= ), XATTR_DEF= )
260 fi
261 fi
262 if test x$XATTR_DEF = x-DLibisofs_with_aaip_xattR
263 then
264 echo "enabled xattr, local processing of extended file attributes Linux style"
265 elif test x$XATTR_DEF = x-DLibisofs_with_freebsd_extattR
266 then
267 echo "enabled extattr, local processing of extended file attributes FreeBSD style"
268 else
269 echo "disabled local processing of extended file attributes"
270 fi
271 AC_SUBST(XATTR_DEF)
272
273
274 dnl ts A90409
275 dnl Same situation as with xattr and ACL: libisoburn does not depend directly
276 dnl on zlib. But if it is enabled in libisofs then it seems wise to link it
277 dnl with libisoburn apps.
278 AC_ARG_ENABLE(zlib,
279 [ --enable-zlib Enable use of zlib by libisofs, default=yes],
280 , enable_zlib=yes)
281 if test x$enable_zlib = xyes; then
282 dnl Check whether there is the header for zlib.
283 dnl If not, erase this macro which would enable use of compress2() and others.
284 dnl Linking fails on SuSE 9.0 because zlib has compress2() but lacks
285 dnl compressBound(). So compressBound is the more modern thing to test.
286 dnl The empty parameter after "compressBound" causes -lz.
287 ZLIB_DEF="-DLibisofs_with_zliB"
288 AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compressBound, , ZLIB_DEF= ), ZLIB_DEF= )
289 else
290 ZLIB_DEF=
291 fi
292 AC_SUBST(ZLIB_DEF)
293
294 dnl ts B00928
295 AC_ARG_ENABLE(libjte,
296 [ --enable-libjte Enable use of libjte >= 2.0 by xorriso, default=yes],
297 , enable_libjte=yes)
298 if test "x$enable_libjte" = xyes; then
299 LIBJTE_DEF="-DXorriso_with_libjtE"
300 AC_CHECK_HEADER(libjte/libjte.h, AC_CHECK_LIB(jte, libjte_set_checksum_algorithm, , LIBJTE_DEF= ), LIBJTE_DEF= )
301 else
302 LIBJTE_DEF=
303 fi
304 AC_SUBST(LIBJTE_DEF)
305
306 dnl ts B00107
307 dnl Just for the case that it is necessary to give link option -lcdio not only
308 dnl with libburn but also with libburn apps like xorriso.
309 dnl On SuSE 10.2 this is not needed. libburn finds libcdio on its own.
310 case $host_os in
311 cygwin*|mingw*)
312 default_libcdio=yes
313 ;;
314 *)
315 default_libcdio=no
316 ;;
317 esac
318 AC_ARG_ENABLE(libcdio,
319 [ --enable-libcdio Enable use of libcdio as system adapter, default=no (except on MSWindows)],
320 , enable_libcdio=$default_libcdio)
321 if test x$enable_libcdio = xyes; then
322 dnl Check whether there is libcdio-devel and libcdio-runtime.
323 dnl If not, erase this macro
324 LIBCDIO_DEF="-DLibburn_use_libcdiO"
325 dnl The empty yes case obviously causes -lcdio to be linked
326 AC_CHECK_HEADER(cdio/cdio.h, AC_CHECK_LIB(cdio, mmc_last_cmd_sense, , LIBCDIO_DEF= ), LIBCDIO_DEF= )
327 else
328 LIBCDIO_DEF=
329 fi
330 if test x$LIBCDIO_DEF = x
331 then
332 if test x$enable_libcdio = xyes
333 then
334 echo "WARNING: could not enable use of libcdio as system adapter"
335 fi
336 else
337 echo "enabled use of libcdio as system adapter"
338 fi
339 AC_SUBST(LIBCDIO_DEF)
340
341
342 AC_ARG_ENABLE(external-filters,
343 [ --enable-external-filters Enable use of external filter programs by xorriso, default=yes],
344 , enable_external_filters=yes)
345 if test x"$enable_external_filters" = xyes; then
346 EXTF_DEF="-DXorriso_allow_external_filterS"
347 echo "enabled xorriso external filter programs"
348 else
349 EXTF_DEF=
350 echo "disabled xorriso external filter programs"
351 fi
352 AC_SUBST(EXTF_DEF)
353
354 AC_ARG_ENABLE(external-filters-setuid,
355 [ --enable-external-filters-setuid Enable xorriso external filter programs under setuid, default=no],
356 , enable_external_filters_setuid=no)
357 if test x$enable_external_filters_setuid = xyes; then
358 EXTF_SUID_DEF="-DXorriso_allow_extf_suiD"
359 echo "enabled xorriso external filter programs under setuid"
360 else
361 EXTF_SUID_DEF=
362 echo "disabled xorriso external filter programs under setuid"
363 fi
364 AC_SUBST(EXTF_SUID_DEF)
365
366
367 AC_ARG_ENABLE(launch-frontend,
368 [ --enable-launch-frontend Enable start of piped frontend program by xorriso, default=yes],
369 , enable_launch_frontend=yes)
370 if test x"$enable_launch_frontend" = xyes; then
371 LFRONT_DEF="-DXorriso_allow_launch_frontenD"
372 echo "enabled xorriso command -launch_frontend"
373 else
374 LFRONT_DEF=
375 echo "disabled xorriso command -launch_frontend"
376 fi
377 AC_SUBST(LFRONT_DEF)
378
379 AC_ARG_ENABLE(launch-frontend-setuid,
380 [ --enable-launch-frontend-setuid Enable start of piped frontend program under setuid, default=no],
381 , enable_launch_frontend_setuid=no)
382 if test x$enable_launch_frontend_setuid = xyes; then
383 LFRONT_SUID_DEF="-DXorriso_allow_extf_suiD"
384 echo "enabled xorriso command -launch_frontend under setuid"
385 else
386 LFRONT_SUID_DEF=
387 echo "disabled xorriso command -launch_frontend under setuid"
388 fi
389 AC_SUBST(LFRONT_SUID_DEF)
390
391
392 AC_ARG_ENABLE(dvd-obs-64k,
393 [ --enable-dvd-obs-64k 64 KB default size for xorriso DVD writing, default=no],
394 , enable_dvd_obs_64=no)
395 if test x$enable_dvd_obs_64k = xyes; then
396 XORRISO_DVD_OBS_64K="-DXorriso_dvd_obs_default_64K"
397 echo "enabled xorriso write size default 64 KB on DVD"
398 else
399 XORRISO_DVD_OBS_64K=
400 echo "disabled xorriso write size default 64 KB on DVD"
401 fi
402 AC_SUBST(XORRISO_DVD_OBS_64K)
403
404 # Library versioning normally serves a complex purpose.
405 # Since libisoburn obeys strict ABI backward compatibility, it needs only the
406 # simple feature to declare function names "global:" or "local:". Only the
407 # global ones are visible to applications at library load time.
408 AC_ARG_ENABLE(versioned-libs,
409 [ --enable-versioned-libs Enable strict symbol encapsulation , default=yes],
410 , enable_versioned_libs=yes)
411 if test x$enable_versioned_libs = xyes; then
412 vers_libs_test=no
413 LIBISOBURN_ASSERT_VERS_LIBS
414 if test x$vers_libs_test = xno
415 then
416 echo "disabled strict symbol encapsulation (test failed)"
417 else
418 echo "enabled strict symbol encapsulation"
419 fi
420 else
421 echo "disabled strict symbol encapsulation"
422 fi
423
424 AC_ARG_ENABLE(ldconfig-at-install,
425 [ --enable-ldconfig-at-install On GNU/Linux run ldconfig, default=yes],
426 , ldconfig_at_install=yes)
427 if test x$ldconfig_at_install = xyes; then
428 dummy=dummy
429 else
430 LIBBURNIA_LDCONFIG_CMD="echo 'NOTE: ldconfig is disabled. If needed, configure manually for:'"
431 echo "disabled run of ldconfig during installation on GNU/Linux"
432 fi
433 AC_SUBST(LIBBURNIA_LDCONFIG_CMD)
434
435
436 AC_CHECK_HEADER(libburn/libburn.h, LIBBURNIA_HAVE_LIBBURN=1, LIBBURNIA_HAVE_LIBBURN=0)
437 AC_CHECK_HEADER(libisofs/libisofs.h, LIBBURNIA_HAVE_LIBISOFS=1, LIBBURNIA_HAVE_LIBISOFS=0)
438 if test x$LIBBURNIA_HAVE_LIBBURN = x0; then
439 echo "FATAL: Lacking libburn development header file <libburn/libburn.h>" 2>&1
440 echo "HINT: You first have to install libburn before you can build libisoburn" 2>&1
441 fi
442 if test x$LIBBURNIA_HAVE_LIBISOFS = x0; then
443 echo "FATAL: Lacking libisofs development header file <libisofs/libisofs.h>" 2>&1
444 echo "HINT: You first have to install libisofs before you can build libisoburn" 2>&1
445 fi
446 if test x$LIBBURNIA_HAVE_LIBBURN = x0 -o x$LIBBURNIA_HAVE_LIBISOFS = x0; then
447 echo "ABORT: Lacking mandatory prerequisites" 2>&1
448 exit 1
449 fi
450
451 # ------- Visible mark in configure : Start of library check
452
453 # Check for proper library versions if this is desired.
454 # (It fails too often on too many systems.)
455 AC_ARG_ENABLE(pkg-check-modules,
456 [ --enable-pkg-check-modules Enable pkg-config check for libburn and libisofs , default=no],
457 , enable_pkg_check_modules=no)
458 if test x$enable_pkg_check_modules = xyes; then
459
460 dnl If PKG_CHECK_MODULES is to be used after this if-block,
461 dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block.
462
463 LIBBURN_REQUIRED=1.5.4
464 LIBISOFS_REQUIRED=1.5.4
465 PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED)
466 PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED)
467 if test x$LIBCDIO_DEF = x; then
468 dummy=dummy
469 else
470 LIBCDIO_REQUIRED=0.83
471 PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
472 fi
473 else
474 echo "checking for LIBBURN... skipped, no --enable-pkg-check-modules"
475 echo "checking for LIBISOFS... skipped, no --enable-pkg-check-modules"
476 if test x$LIBCDIO_DEF = x; then
477 dummy=dummy
478 else
479 echo "checking for LIBCDIO... skipped, no --enable-pkg-check-modules"
480 fi
481 fi
482
483 # ------- Visible mark in configure : End of library check
484
485 dnl Add compiler-specific flags
486
487 dnl See if the user wants aggressive optimizations of the code
488 AC_ARG_ENABLE(debug,
489 [ --enable-debug Disable aggressive optimizations [default=yes]],
490 , enable_debug=yes)
491 if test x$enable_debug != xyes; then
492 if test x$GCC = xyes; then
493 CFLAGS="-O3 $CFLAGS"
494 CFLAGS="-fexpensive-optimizations $CFLAGS"
495 fi
496 CFLAGS="-DNDEBUG $CFLAGS"
497 else
498 if test x$GCC = xyes; then
499 CFLAGS="-g -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-char-subscripts $CFLAGS"
500 fi
501 CFLAGS="-DDEBUG $CFLAGS"
502 fi
503
504 CFLAGS="$READLINE_DEF $LIBACL_DEF $XATTR_DEF $EXTF_DEF $EXTF_SUID_DEF $LFRONT_DEF $LFRONT_SUID_DEF $ZLIB_DEF $LIBJTE_DEF $XORRISO_DVD_OBS_64K $CFLAGS"
505
506 AC_CONFIG_FILES([
507 Makefile
508 doc/doxygen.conf
509 version.h
510 libisoburn-1.pc
511 ])
512 AC_OUTPUT