File: configure.ac

package info (click to toggle)
cabextract 1.4-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,048 kB
  • ctags: 991
  • sloc: ansic: 5,963; sh: 625; perl: 348; makefile: 84
file content (61 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(cabextract, 1.4, kyzer@4u.net)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/cabextract.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_EXEEXT

# Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_HEADERS([ctype.h errno.h fnmatch.h libintl.h limits.h stdlib.h \
	string.h strings.h utime.h stdarg.h sys/stat.h sys/time.h sys/types.h \
	getopt.h wchar.h wctype.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_SIZEOF([off_t])
AC_SYS_LARGEFILE

# Checks for library functions.
AC_FUNC_FNMATCH
AC_FUNC_FSEEKO
AX_FUNC_MKDIR
AC_FUNC_MKTIME
AC_CHECK_FUNCS([memcpy strcasecmp strchr utime utimes])
AC_CHECK_FUNCS([getopt_long],,[AC_CHECK_LIB([gnugetopt], [getopt_long],
  [AC_DEFINE([HAVE_GETOPT_LONG])],[AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)])])
AC_REPLACE_FNMATCH

# use an external libmspack if requested
cabextract_external_libmspack=no
AC_ARG_WITH([external-libmspack],
 [AS_HELP_STRING([--with-external-libmspack],[use external libmspack (default no)])],
 [cabextract_external_libmspack=$withval])

if test "z$cabextract_external_libmspack" != 'zno'; then
 AC_CHECK_HEADER([mspack.h], ,[AC_MSG_ERROR([Cannot find libmspack header])])
fi

if test "z$cabextract_external_libmspack" != 'zno'; then
 AC_CHECK_LIB([mspack],[mspack_create_cab_compressor], 
  [LIBMSPACK_LIBS=-lmspack],
  [AC_MSG_ERROR([Cannot find libmspack library])])
fi
AC_SUBST([LIBMSPACK_LIBS])
AM_CONDITIONAL([EXTERNAL_LIBMSPACK], [test "z$cabextract_external_libmspack" != 'zno'])

AC_CONFIG_FILES([Makefile cabextract.spec])
AC_OUTPUT