~ubuntu-branches/ubuntu/trusty/util-linux/trusty-proposed

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): LaMont Jones
  • Date: 2011-11-03 15:38:23 UTC
  • mto: (4.5.5 sid) (1.6.4)
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: package-import@ubuntu.com-20111103153823-10sx16jprzxlhkqf
ImportĀ upstreamĀ versionĀ 2.20.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_INIT(util-linux, 2.19.1, kzak@redhat.com)
 
1
AC_INIT(util-linux,
 
2
        m4_esyscmd([tools/git-version-gen .tarball-version]),
 
3
        kzak@redhat.com)
2
4
 
3
5
AC_PREREQ(2.60)
4
6
 
5
7
AC_CONFIG_AUX_DIR(config)
6
8
AC_CONFIG_MACRO_DIR([m4])
7
9
 
8
 
AM_INIT_AUTOMAKE([check-news -Wall foreign 1.10 dist-bzip2])
 
10
AM_INIT_AUTOMAKE([-Wall foreign 1.10 dist-bzip2 -Wno-portability])
9
11
 
10
12
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11
13
                            [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
22
24
 
23
25
dnl libblkid version
24
26
LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
25
 
LIBBLKID_DATE="02-May-2011"
 
27
LIBBLKID_DATE="19-Oct-2011"
26
28
LIBBLKID_LT_MAJOR=1
27
29
LIBBLKID_LT_MINOR=1
28
30
LIBBLKID_LT_MICRO=0
73
75
usrlib_execdir='${exec_prefix}/'$libdirname
74
76
AC_SUBST([usrlib_execdir])
75
77
 
76
 
 
 
78
AM_PROG_CC_C_O
77
79
AC_PROG_CC_STDC
78
80
AC_GNU_SOURCE
79
81
AC_CANONICAL_HOST
84
86
dnl libtool-2
85
87
LT_INIT
86
88
 
 
89
m4_ifndef([PKG_PROG_PKG_CONFIG],
 
90
  [m4_fatal([Could not locate the pkg-config autoconf
 
91
    macros. These are usually located in /usr/share/aclocal/pkg.m4.
 
92
    If your macros are in a different location, try setting the
 
93
    environment variable AL_OPTS="-I/other/macro/dir" before running
 
94
    ./autogen.sh or autoreconf again.])])
87
95
PKG_PROG_PKG_CONFIG
88
96
 
89
97
GTK_DOC_CHECK([1.10])
127
135
        netinet/in.h \
128
136
        rpcsvc/nfs_prot.h \
129
137
        stdlib.h \
 
138
        asm/io.h \
130
139
        sys/disk.h \
131
140
        sys/disklabel.h \
132
141
        sys/ioctl.h \
175
184
 
176
185
AC_CHECK_FUNCS(
177
186
        [inet_aton \
 
187
        err \
 
188
        errx \
178
189
        futimens \
179
190
        fstat64 \
180
191
        fsync \
193
204
        getdtablesize \
194
205
        getexecname \
195
206
        getrlimit \
 
207
        sigqueue \
196
208
        srandom \
197
209
        setresgid \
198
210
        setresuid \
204
216
        posix_fadvise \
205
217
        getmntinfo \
206
218
        __secure_getenv \
 
219
        warn \
 
220
        warnx \
207
221
        rpmatch])
208
222
AC_FUNC_FSEEKO
209
223
 
210
224
AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
211
225
 
 
226
AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
 
227
AM_CONDITIONAL([BUILD_HWCLOCK], test "x$have_io" = xyes -o "x$linux_os" = xyes)
 
228
 
212
229
AC_CHECK_MEMBER(struct sockaddr.sa_len,
213
230
                AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
214
231
        [#include <sys/types.h>
353
370
AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
354
371
 
355
372
 
 
373
AC_ARG_ENABLE([partx],
 
374
  AS_HELP_STRING([--disable-partx], [do not build addpart, delpart, partx]),
 
375
  [], enable_partx=check
 
376
)
 
377
build_partx=yes
 
378
if test "x$enable_partx" = xcheck; then
 
379
  if test "x$linux_os" = xno; then
 
380
    AC_MSG_WARN([non-linux system; do not build partx utilities])
 
381
    build_partx=no
 
382
  fi
 
383
elif test "x$enable_partx" = xno; then
 
384
    build_partx=no
 
385
fi
 
386
AM_CONDITIONAL(BUILD_PARTX, test "x$build_partx" = xyes)
 
387
 
 
388
 
356
389
AC_ARG_ENABLE([libuuid],
357
390
  AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
358
391
  [], enable_libuuid=yes
360
393
AC_SUBST([LIBUUID_VERSION])
361
394
AC_SUBST([LIBUUID_VERSION_INFO])
362
395
AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
363
 
have_uuid=yes
364
 
 
365
 
if test "x$enable_libuuid" = xno; then
366
 
  # Check for external (e2fsprogs) libuuid
367
 
  PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
368
 
  if test "x$have_uuid" = xno; then
369
 
    # system without pkg-config or so, try classic check
370
 
    AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
371
 
  fi
372
 
  if test "x$have_uuid" = xyes; then
373
 
    UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
374
 
    AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
375
 
    UTIL_RESTORE_FLAGS
376
 
  fi
377
 
else
378
 
  # internal library
379
 
  AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
380
 
fi
381
 
 
382
 
if test "x$have_uuid" = xyes; then
 
396
 
 
397
if test "x$enable_libuuid" = xyes; then
383
398
  AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
384
399
else
385
400
  AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
386
401
fi
387
 
AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
388
 
# default
389
 
: ${UUID_LIBS='-luuid'}
390
402
 
391
403
 
392
404
AC_ARG_ENABLE([uuidd],
394
406
  [], enable_uuidd=auto
395
407
)
396
408
 
397
 
case "$enable_uuidd:$have_uuid" in
 
409
case "$enable_uuidd:$enable_libuuid" in
398
410
yes:no)
399
411
  AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
400
412
auto:*)
401
 
  enable_uuidd=$have_uuid ;;
 
413
  enable_uuidd=$enable_libuuid ;;
402
414
esac
403
415
if test "x$enable_uuidd" = xyes; then
404
416
  AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
416
428
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
417
429
AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
418
430
AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
419
 
have_blkid=yes
420
 
 
421
 
if test "x$enable_libblkid" = xno; then
422
 
  if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
423
 
    # Check for external (e2fsprogs) libblkid
424
 
    PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
425
 
    if test "x$have_blkid" = xno; then
426
 
      # system without pkg-config or so, try classic check
427
 
      AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
428
 
    fi
429
 
    if test "x$have_blkid" = xyes; then
430
 
      UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
431
 
      AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
432
 
      UTIL_RESTORE_FLAGS
433
 
    fi
434
 
    if test -n "$enable_static_programs"; then
435
 
      # TODO check only when mount of fsck are requested
436
 
      UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
437
 
    fi
438
 
  fi
439
 
else
440
 
  # internal library
441
 
  AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
442
 
  AC_DEFINE(HAVE_LIBBLKID_INTERNAL, 1, [Define to 1 if you have the in-tree libblkid.])
443
 
fi
444
 
 
445
 
if test "x$have_blkid" = xyes; then
 
431
 
 
432
if test "x$enable_libblkid" = xyes; then
446
433
  AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
447
434
else
448
435
  if test "x$build_mount" = xyes; then
451
438
  if test "x$enable_fsck" = xyes; then
452
439
    AC_MSG_ERROR([libblkid is needed to build util-linux fsck])
453
440
  fi
 
441
  if test "x$build_partx" = xyes; then
 
442
    AC_MSG_ERROR([libblkid is needed to build util-linux partx])
 
443
  fi
454
444
fi
455
 
AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
456
 
# default
457
 
: ${BLKID_LIBS='-lblkid -luuid'}
458
 
 
459
 
AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
460
445
 
461
446
 
462
447
AC_ARG_ENABLE([libmount],
473
458
    build_libmount=no
474
459
fi
475
460
 
 
461
AC_DEFUN([UTIL_SCANF_TYPE_MODIFIER], [dnl
 
462
# include <stdio.h>
 
463
int main()
 
464
{
 
465
        int i;
 
466
        char *s;
 
467
        i = sscanf("x", $1, &s);
 
468
        if (i == 1)
 
469
                return 0;
 
470
        return 1;
 
471
}])
 
472
AC_MSG_CHECKING([needed scanf type modifiers])
 
473
AC_CACHE_VAL([scanf_cv_type_modifier],
 
474
  AC_RUN_IFELSE([AC_LANG_SOURCE([UTIL_SCANF_TYPE_MODIFIER(["%ms"])])],
 
475
    [scanf_cv_type_modifier=ms],
 
476
    AC_RUN_IFELSE([AC_LANG_SOURCE([UTIL_SCANF_TYPE_MODIFIER(["%as"])])],
 
477
      [scanf_cv_type_modifier=as],
 
478
      [scanf_cv_type_modifier=no]
 
479
    )
 
480
  )
 
481
)
 
482
 
 
483
case "$scanf_cv_type_modifier" in
 
484
ms)
 
485
  AC_MSG_RESULT([(%ms) yes])
 
486
  AC_DEFINE([HAVE_SCANF_MS_MODIFIER], [1], [scanf %ms modifier]) ;;
 
487
as)
 
488
  AC_MSG_RESULT([(%as) yes])
 
489
  AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier]) ;;
 
490
*)
 
491
  AC_MSG_RESULT([no])
 
492
  if "x$build_libmount" = xyes; then
 
493
    AC_MSG_WARN([%as or %ms for sscanf() not found; do not build libmount])
 
494
    build_libmount=no
 
495
  fi
 
496
esac
 
497
 
 
498
 
476
499
case "$enable_libblkid:$build_libmount" in
477
500
no:yes)
478
501
  AC_MSG_ERROR([cannot enable libmount when libblkid is disabled]) ;;
498
521
AM_CONDITIONAL(BUILD_LIBMOUNT_MOUNT, test "x$enable_libmount_mount" = xyes)
499
522
 
500
523
 
 
524
AC_ARG_ENABLE([mountpoint],
 
525
  AS_HELP_STRING([--disable-mountpoint], [do not build mountpoint]),
 
526
  [], enable_mountpoint=check
 
527
)
 
528
 
 
529
build_mountpoint=yes
 
530
if test "x$enable_mountpoint" = xcheck; then
 
531
  if test "x$build_libmount" = xno; then
 
532
    AC_MSG_WARN([libmount disabled; do not build mountpoint])
 
533
    build_mountpoint=no
 
534
  fi
 
535
elif test "x$enable_mountpoint" = xno; then
 
536
    build_mountpoint=no
 
537
fi
 
538
 
 
539
case "$build_libmount:$build_mountpoint" in
 
540
no:yes)
 
541
  AC_MSG_ERROR([cannot enable mountpoint when libmount is disabled]) ;;
 
542
esac
 
543
AM_CONDITIONAL(BUILD_MOUNTPOINT, test "x$build_mountpoint" = xyes)
 
544
 
 
545
 
501
546
UTIL_CHECK_LIB(util, openpty)
502
547
UTIL_CHECK_LIB(termcap, tgetnum)
503
548
 
616
661
 
617
662
AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
618
663
 
619
 
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
620
 
#include <stdio.h>
621
 
]], [[
622
 
printf(__progname);
623
 
]])],
624
 
[AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
625
 
])
626
 
 
627
 
 
628
664
AC_CHECK_TYPES([union semun], [], [], [[
629
665
#include <sys/sem.h>
630
666
]])
785
821
        [#include <sys/stat.h>])
786
822
 
787
823
AC_CHECK_DECLS([
 
824
 UNAME26,
788
825
 ADDR_NO_RANDOMIZE,
789
826
 FDPIC_FUNCPTRS,
790
827
 MMAP_PAGE_ZERO,
848
885
)
849
886
AM_CONDITIONAL(BUILD_ARCH, test "x$enable_arch" = xyes)
850
887
 
 
888
AC_ARG_ENABLE([ddate],
 
889
  AS_HELP_STRING([--enable-ddate], [do build ddate]),
 
890
  [], enable_ddate=no
 
891
)
 
892
AM_CONDITIONAL(BUILD_DDATE, test "x$enable_ddate" = xyes)
 
893
 
851
894
AC_ARG_ENABLE([agetty],
852
895
  AS_HELP_STRING([--disable-agetty], [do not build agetty]),
853
896
  [], enable_agetty=yes
984
1027
)
985
1028
AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes)
986
1029
 
987
 
 
988
 
AC_ARG_ENABLE([init],
989
 
  AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
990
 
  [], enable_init=no
991
 
)
992
 
AM_CONDITIONAL(BUILD_INIT, test "x$enable_init" = xyes)
993
 
 
994
 
 
995
1030
AC_ARG_ENABLE([kill],
996
1031
  AS_HELP_STRING([--enable-kill], [build kill]),
997
1032
  [], enable_kill=no
1005
1040
)
1006
1041
AM_CONDITIONAL(BUILD_LAST, test "x$enable_last" = xyes)
1007
1042
 
 
1043
AC_ARG_ENABLE([line],
 
1044
  AS_HELP_STRING([--enable-line], [build line]),
 
1045
  [], enable_line=no
 
1046
)
 
1047
AM_CONDITIONAL(BUILD_LINE, test "x$enable_line" = xyes)
1008
1048
 
1009
1049
AC_ARG_ENABLE([mesg],
1010
1050
  AS_HELP_STRING([--enable-mesg], [build mesg]),
1013
1053
AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
1014
1054
 
1015
1055
 
1016
 
AC_ARG_ENABLE([partx],
1017
 
  AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
1018
 
  [], enable_partx=no
1019
 
)
1020
 
AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
1021
 
 
1022
 
 
1023
1056
AC_ARG_ENABLE([raw],
1024
1057
  AS_HELP_STRING([--enable-raw], [build raw]),
1025
1058
  [], enable_raw=no
1241
1274
getopt/Makefile
1242
1275
hwclock/Makefile
1243
1276
include/Makefile
1244
 
simpleinit/Makefile
1245
1277
lib/Makefile
1246
1278
login-utils/Makefile
1247
1279
Makefile
1252
1284
partx/Makefile
1253
1285
po/Makefile.in
1254
1286
schedutils/Makefile
1255
 
shlibs/blkid/blkid.pc
1256
 
shlibs/blkid/Makefile
1257
 
shlibs/blkid/docs/Makefile
1258
 
shlibs/blkid/docs/version.xml
1259
 
shlibs/blkid/src/Makefile
1260
 
shlibs/blkid/src/blkid.h
1261
 
shlibs/blkid/src/superblocks/Makefile
1262
 
shlibs/blkid/src/topology/Makefile
1263
 
shlibs/blkid/src/partitions/Makefile
1264
 
shlibs/blkid/samples/Makefile
1265
 
shlibs/mount/mount.pc
1266
 
shlibs/mount/Makefile
1267
 
shlibs/mount/src/Makefile
1268
 
shlibs/mount/src/libmount.h
1269
 
shlibs/mount/docs/Makefile
1270
 
shlibs/mount/docs/version.xml
1271
 
shlibs/mount/samples/Makefile
1272
 
shlibs/uuid/uuid.pc
1273
 
shlibs/uuid/Makefile
1274
 
shlibs/uuid/man/Makefile
1275
 
shlibs/uuid/src/Makefile
 
1287
libblkid/blkid.pc
 
1288
libblkid/Makefile
 
1289
libblkid/docs/Makefile
 
1290
libblkid/docs/version.xml
 
1291
libblkid/src/Makefile
 
1292
libblkid/src/blkid.h
 
1293
libblkid/src/superblocks/Makefile
 
1294
libblkid/src/topology/Makefile
 
1295
libblkid/src/partitions/Makefile
 
1296
libblkid/samples/Makefile
 
1297
libmount/mount.pc
 
1298
libmount/Makefile
 
1299
libmount/src/Makefile
 
1300
libmount/src/libmount.h
 
1301
libmount/docs/Makefile
 
1302
libmount/docs/version.xml
 
1303
libmount/samples/Makefile
 
1304
libuuid/uuid.pc
 
1305
libuuid/Makefile
 
1306
libuuid/man/Makefile
 
1307
libuuid/src/Makefile
1276
1308
sys-utils/Makefile
 
1309
term-utils/Makefile
1277
1310
tests/commands.sh
1278
1311
tests/helpers/Makefile
1279
1312
tests/Makefile