~pr0gg3d/ubuntu/oneiric/util-linux/bug-805886

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-07-16 15:48:23 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090716154823-i26fshvs4v8h90qh
Tags: 2.16-1ubuntu1
* Merge from Debian, remaining changes:
  - Since udev is required in Ubuntu, the hwclock.sh init script is
    not called on startup and the hwclockfirst.sh init script is
    removed.
  - Remove /etc/adjtime on upgrade if it was not used.
  - Install custom blkid.conf to use /dev/.blkid.tab since we don't
    expect device names to survive a reboot
  - No lsb_release call in mount.preinst since we'd need Pre-Depends
    (LP: #383697).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_INIT(util-linux-ng, 2.15.1, kzak@redhat.com)
 
1
AC_INIT(util-linux-ng, 2.16, kzak@redhat.com)
2
2
 
3
3
AC_PREREQ(2.60)
4
4
 
20
20
dnl libblkid version
21
21
LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
22
22
LIBBLKID_DATE="10-Feb-2009"
 
23
LIBBLKID_LT_MAJOR=1
 
24
LIBBLKID_LT_MINOR=1
 
25
LIBBLKID_LT_MICRO=0
 
26
LIBBLKID_VERSION_INFO=`expr $LIBBLKID_LT_MAJOR + $LIBBLKID_LT_MINOR`:$LIBBLKID_LT_MICRO:$LIBBLKID_LT_MINOR
 
27
 
 
28
dnl libuuid version
 
29
LIBUUID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
 
30
LIBUUID_LT_MAJOR=1
 
31
LIBUUID_LT_MINOR=3
 
32
LIBUUID_LT_MICRO=0
 
33
LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
23
34
 
24
35
# Check whether exec_prefix=/usr:
25
36
case $exec_prefix:$prefix in
39
50
  esac ;;
40
51
esac
41
52
 
42
 
# lib64
43
 
case ${libdir} in
44
 
  *lib64) libdirname=lib64 ;;
45
 
  *) libdirname=lib
46
 
esac
 
53
libdirname=`basename "$libdir"`
47
54
AC_SUBST([libdirname])
48
55
 
 
56
# The original default values of {bin,sbin,lib}dir
 
57
usrbin_execdir='${exec_prefix}/bin'
 
58
AC_SUBST([usrbin_execdir])
 
59
 
 
60
usrsbin_execdir='${exec_prefix}/sbin'
 
61
AC_SUBST([usrsbin_execdir])
 
62
 
 
63
usrlib_execdir='${exec_prefix}/'$libdirname
 
64
AC_SUBST([usrlib_execdir])
 
65
 
 
66
 
49
67
AC_PROG_CC_STDC
50
68
AC_GNU_SOURCE
51
69
AC_CANONICAL_HOST
84
102
        linux/tiocl.h \
85
103
        linux/version.h \
86
104
        locale.h \
87
 
        stdlib.h \
 
105
        stdint.h \
 
106
        inttypes.h \
88
107
        pty.h \
89
108
        mntent.h \
 
109
        net/if.h \
 
110
        net/if_dl.h \
 
111
        netinet/in.h \
90
112
        rpcsvc/nfs_prot.h \
91
113
        scsi/scsi.h \
92
114
        stdlib.h \
94
116
        sys/disklabel.h \
95
117
        sys/ioctl.h \
96
118
        sys/io.h \
 
119
        sys/time.h \
97
120
        sys/mkdev.h \
98
121
        sys/prctl.h \
99
122
        sys/queue.h \
 
123
        sys/sockio.h \
 
124
        sys/file.h \
 
125
        sys/ioctl.h \
100
126
        sys/stat.h \
101
127
        sys/types.h \
 
128
        sys/un.h \
102
129
        sys/user.h \
 
130
        sys/resource.h \
103
131
        unistd.h ])
104
132
AC_CHECK_HEADERS([linux/raw.h],
105
133
                 [AM_CONDITIONAL([HAVE_RAW], [true])],
115
143
        nanosleep \
116
144
        personality \
117
145
        updwtmp \
 
146
        jrand48 \
118
147
        lchown \
119
148
        llseek \
120
149
        lseek64 \
121
150
        strtoull \
 
151
        sysconf \
 
152
        getdtablesize \
 
153
        getrlimit \
 
154
        srandom \
 
155
        setresgid \
 
156
        setresuid \
122
157
        inotify_init \
123
158
        prctl \
124
159
        __secure_getenv \
125
160
        rpmatch])
126
161
AC_FUNC_FSEEKO
127
162
 
 
163
AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
 
164
 
 
165
AC_CHECK_MEMBER(struct sockaddr.sa_len,
 
166
                AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
 
167
        [#include <sys/types.h>
 
168
         #include <sys/socket.h>])
 
169
 
128
170
dnl Static compilation
129
171
m4_define([UTIL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
130
172
 
147
189
    [test "x$static_[]UTIL_PRG" = xyes])
148
190
])
149
191
 
 
192
dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
 
193
dnl ----------------------------------
 
194
AC_DEFUN([UTIL_PKG_STATIC], [
 
195
  if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
 
196
    $1=`pkg-config --libs --static "$2"`
 
197
  else
 
198
    AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
 
199
  fi
 
200
])
 
201
 
150
202
dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1]))
151
203
dnl The VARSUFFIX is optional and overrides the default behaviour. For example:
152
204
dnl     UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX
178
230
  LDFLAGS="$old_LDFLAGS"
179
231
])
180
232
 
 
233
 
 
234
AC_ARG_ENABLE([tls],
 
235
  AS_HELP_STRING([--disable-tls], [disable use of thread local support]),
 
236
  [], enable_tls=yes
 
237
)
 
238
if test "x$enable_tls" = xyes; then
 
239
  AX_TLS
 
240
fi
 
241
 
 
242
 
181
243
AC_ARG_ENABLE([mount],
182
244
  AS_HELP_STRING([--disable-mount], [do not build mount utilities]),
183
245
  [], enable_mount=check
195
257
 
196
258
 
197
259
AC_ARG_ENABLE([fsck],
198
 
  AS_HELP_STRING([--enable-fsck], [do build fsck]),
199
 
  [], enable_fsck=no
 
260
  AS_HELP_STRING([--disable-fsck], [do not build fsck]),
 
261
  [], enable_fsck=yes
200
262
)
201
263
AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
202
264
 
203
265
 
204
 
UTIL_CHECK_LIB(uuid, uuid_is_null)
205
 
if test "x$have_uuid" = xno; then
 
266
AC_ARG_ENABLE([libuuid],
 
267
  AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
 
268
  [], enable_libuuid=yes
 
269
)
 
270
AC_SUBST([LIBUUID_VERSION])
 
271
AC_SUBST([LIBUUID_VERSION_INFO])
 
272
AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
 
273
have_uuid=yes
 
274
 
 
275
if test "x$enable_libuuid" = xno; then
 
276
  # Check for external (e2fsprogs) libuuid
 
277
  PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
 
278
  if test "x$have_uuid" = xno; then
 
279
    # system without pkg-config or so, try classic check
 
280
    AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
 
281
  fi
 
282
  if test "x$have_uuid" = xyes; then
 
283
    UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
 
284
    AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
 
285
    UTIL_RESTORE_FLAGS
 
286
  fi
 
287
else
 
288
  # internal library
 
289
  AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
 
290
fi
 
291
 
 
292
if test "x$have_uuid" = xyes; then
 
293
  AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
 
294
else
206
295
  AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
207
296
fi
208
 
 
209
 
UTIL_CHECK_LIB(util, openpty)
210
 
UTIL_CHECK_LIB(termcap, tgetnum)
211
 
 
212
 
 
213
 
AC_ARG_WITH([fsprobe],
214
 
  [AS_HELP_STRING([--with-fsprobe=LIB], [library to guess filesystems, LIB should be builtin|blkid|volume_id, default is blkid])],
215
 
  [], [with_fsprobe=blkid]
216
 
)
217
 
 
218
 
build_libblkid=no
219
 
have_blkid=no
220
 
have_volume_id=no
221
 
 
222
 
if test "x$with_fsprobe" = xbuiltin; then
223
 
  have_blkid=yes
224
 
  build_libblkid=yes
225
 
  AC_SUBST(LIBBLKID_VERSION)
226
 
  AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
227
 
  AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
228
 
  AC_DEFINE(HAVE_BLKID_EVALUATE_TAG, 1, [Define to 1 if you have the blkid_evaluate_tag().])
229
 
  AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
230
 
elif test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
231
 
  if test "x$with_fsprobe" = xblkid; then
 
297
AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
 
298
# default
 
299
: ${UUID_LIBS='-luuid'}
 
300
 
 
301
 
 
302
AC_ARG_ENABLE([uuidd],
 
303
  AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
 
304
  [], enable_uuidd=auto
 
305
)
 
306
 
 
307
case "$enable_uuidd:$have_uuid" in
 
308
yes:no)
 
309
  AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
 
310
auto:*)
 
311
  enable_uuidd=$have_uuid ;;
 
312
esac
 
313
if test "x$enable_uuidd" = xyes; then
 
314
  AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
 
315
fi
 
316
AM_CONDITIONAL(BUILD_UUIDD, test "x$enable_uuidd" = xyes)
 
317
 
 
318
 
 
319
AC_ARG_ENABLE([libblkid],
 
320
  AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]),
 
321
  [], enable_libblkid=yes
 
322
)
 
323
AC_SUBST([LIBBLKID_VERSION])
 
324
AC_SUBST([LIBBLKID_VERSION_INFO])
 
325
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
 
326
AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
 
327
AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
 
328
have_blkid=yes
 
329
 
 
330
if test "x$enable_libblkid" = xno; then
 
331
  if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
 
332
    # Check for external (e2fsprogs) libblkid
232
333
    PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
233
334
    if test "x$have_blkid" = xno; then
234
335
      # system without pkg-config or so, try classic check
239
340
      AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
240
341
      UTIL_RESTORE_FLAGS
241
342
    fi
242
 
  elif test "x$with_fsprobe" = xvolume_id; then
243
 
    PKG_CHECK_MODULES(VOLUME_ID, volume_id, [have_volume_id=yes], [have_volume_id=no])
244
 
    if test "x$have_volume_id" = xno; then
245
 
      # system without pkg-config or so, try classic check
246
 
      AC_CHECK_LIB(volume_id, volume_id_probe_all, [have_volume_id=yes], [have_volume_id=no])
 
343
    if test -n "$enable_static_programs"; then
 
344
      # TODO check only when mount of fsck are requested
 
345
      UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
247
346
    fi
248
347
  fi
 
348
else
 
349
  # internal library
 
350
  AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
 
351
  AC_DEFINE(HAVE_BLKID_EVALUATE_TAG, 1, [Define to 1 if you have the blkid_evaluate_tag().])
249
352
fi
250
353
 
251
 
if  test "x$have_blkid" = xyes; then
 
354
if test "x$have_blkid" = xyes; then
252
355
  AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
253
 
elif test "x$have_volume_id" = xno; then
 
356
else
254
357
  if test "x$build_mount" = xyes; then
255
 
    AC_MSG_ERROR([libblkid or libvolume_id is needed to build util-linux-ng mount])
 
358
    AC_MSG_ERROR([libblkid is needed to build util-linux-ng mount])
256
359
  fi
257
360
  if test "x$enable_fsck" = xyes; then
258
 
    AC_MSG_ERROR([libblkid or libvoume_id is needed to build util-linux-ng fsck])
 
361
    AC_MSG_ERROR([libblkid is needed to build util-linux-ng fsck])
259
362
  fi
260
363
fi
261
 
 
262
364
AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
263
 
AM_CONDITIONAL(HAVE_VOLUME_ID, test "x$have_volume_id" = xyes)
264
 
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$build_libblkid" = xyes)
265
 
 
266
 
 
267
 
dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
268
 
dnl ----------------------------------
269
 
AC_DEFUN([UTIL_PKG_STATIC], [
270
 
  if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
271
 
    $1=`pkg-config --libs --static "$2"`
272
 
  else
273
 
    AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
274
 
  fi
275
 
])
276
 
 
277
 
# These default values should work in most cases:
 
365
# default
278
366
: ${BLKID_LIBS='-lblkid -luuid'}
279
 
: ${VOLUME_ID_LIBS='-lvolume_id'}
280
 
 
281
 
# ... but for static build, we need to consult pkg-config:
282
 
if test -n "$enable_static_programs"; then
283
 
  case $with_fsprobe in
284
 
  blkid) UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid]) ;;
285
 
  volume_id) UTIL_PKG_STATIC([VOLUME_ID_LIBS_STATIC], [libvolume_id]) ;;
286
 
  esac
287
 
fi
288
367
 
289
368
AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
290
 
AC_ARG_VAR([VOLUME_ID_LIBS_STATIC], [-l options for linking statically with volume_id])
291
 
 
 
369
 
 
370
 
 
371
UTIL_CHECK_LIB(util, openpty)
 
372
UTIL_CHECK_LIB(termcap, tgetnum)
292
373
 
293
374
AM_GNU_GETTEXT_VERSION([0.14.1])
294
375
AM_GNU_GETTEXT([external])
566
647
AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
567
648
 
568
649
 
 
650
AC_ARG_ENABLE([switch_root],
 
651
  AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
 
652
  [], enable_switch_root=check
 
653
)
 
654
 
 
655
if test "x$enable_switch_root" = xno; then
 
656
  build_switch_root=no
 
657
else
 
658
  build_switch_root=yes
 
659
  case $enable_switch_root:$linux_os in
 
660
  yes:no) AC_MSG_ERROR([switch_root selected for non-linux system]);;
 
661
  check:no) AC_MSG_WARN([non-linux system; do not build switch_root])
 
662
            build_switch_root=no;;
 
663
  esac
 
664
  if test "x$build_switch_root" = xyes; then
 
665
    case $enable_switch_root:$have_openat in
 
666
    yes:no) AC_MSG_ERROR([switch_root selected but openat() function not found]);;
 
667
    check:no) AC_MSG_WARN([openat() function not found; do not build switch_root])
 
668
              build_switch_root=no;;
 
669
    esac
 
670
  fi
 
671
fi
 
672
AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
 
673
 
 
674
 
569
675
AC_ARG_ENABLE([elvtune],
570
676
  AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
571
677
  [], enable_elvtune=no
796
902
AC_CONFIG_HEADERS(config.h)
797
903
 
798
904
AC_CONFIG_FILES([
799
 
Makefile
800
905
disk-utils/Makefile
801
906
fdisk/Makefile
802
907
fsck/Makefile
804
909
hwclock/Makefile
805
910
include/Makefile
806
911
lib/Makefile
807
 
libs/Makefile
808
 
libs/blkid/blkid.pc
809
 
libs/blkid/Makefile
810
 
libs/blkid/bin/Makefile
811
 
libs/blkid/src/Makefile
812
 
libs/blkid/src/probers/Makefile
813
912
login-utils/Makefile
 
913
Makefile
 
914
misc-utils/chkdupexe:misc-utils/chkdupexe.pl
814
915
misc-utils/Makefile
815
916
mount/Makefile
816
917
partx/Makefile
817
918
po/Makefile.in
818
919
schedutils/Makefile
 
920
shlibs/blkid/blkid.pc
 
921
shlibs/blkid/Makefile
 
922
shlibs/blkid/src/Makefile
 
923
shlibs/blkid/src/probers/Makefile
 
924
shlibs/uuid/uuid.pc
 
925
shlibs/uuid/Makefile
 
926
shlibs/uuid/man/Makefile
 
927
shlibs/uuid/src/Makefile
 
928
shlibs/Makefile
819
929
sys-utils/Makefile
 
930
tests/commands.sh
 
931
tests/helpers/Makefile
 
932
tests/Makefile
820
933
text-utils/Makefile
821
 
tests/Makefile
822
 
tests/helpers/Makefile
823
 
tests/commands.sh
824
 
misc-utils/chkdupexe:misc-utils/chkdupexe.pl
825
934
])
826
935
 
 
936
 
827
937
AC_OUTPUT