-
Notifications
You must be signed in to change notification settings - Fork 21
/
configure.ac
44 lines (34 loc) · 1.06 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
AC_PREREQ(2.50)
AC_INIT(fatresize, 1.1.0, [[email protected]])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
dnl set some basic variables
DATE_FMT="%Y%m%d"
if test "x$SOURCE_DATE_EPOCH" = "x"; then
BUILD_DATE=$(date "+$DATE_FMT")
else
BUILD_DATE="$(date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT")"
fi
AC_DEFINE_UNQUOTED(BUILD_DATE, "$BUILD_DATE", [The date of the build.])
# Check for programs.
AC_LANG_C
AC_PROG_CC
AC_PROG_INSTALL
# Check headers.
AC_CHECK_HEADERS([ctype.h errno.h stdio.h getopt.h stdarg.h string.h \
stdlib.h unistd.h parted/parted.h])
# Check for library functions.
AC_CHECK_FUNCS([memset strtoll])
# Check for LFS
AC_SYS_LARGEFILE
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=${ac_cv_sys_file_offset_bits}"
dnl libparted
# hack
LIBS="$LIBS -ldl"
PKG_CHECK_MODULES([PARTED], [libparted >= 2.4])
PKG_CHECK_EXISTS([libparted >= 3.1],
[PARTED_LIBS="-lparted-fs-resize $PARTED_LIBS"])
AC_SUBST(PARTED_LIBS)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT