-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
66 lines (51 loc) · 1.5 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
AC_INIT([lib7zip], [1.6.5], [[email protected]])
AC_CONFIG_SRCDIR(Lib7Zip/lib7zip.h)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CXX
AC_C_CONST
AC_C_INLINE
AC_HEADER_STDBOOL
AC_PROG_RANLIB
LT_INIT([dlopen win32-dll])
AC_LANG(C++)
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
# Checks for library functions.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stddef.h string.h unistd.h dlfcn.h dirent.h])
AC_CHECK_FUNCS([memset memmove])
AC_CHECK_FUNCS([sqrt])
dnl check if win32 system
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#ifndef _WIN32
error: This isn't WIN32!
#endif
]])],
[is_win32=yes],
[is_win32=no])
AM_CONDITIONAL(WIN32, test x$is_win32 = xyes)
dnl check for p7zip source
AC_ARG_VAR([P7ZIP_SOURCE_DIR], [p7zip source directory, must be set before compile source])
if test "x$P7ZIP_SOURCE_DIR" = "x"; then
AC_MSG_FAILURE(P7ZIP_SOURCE_DIR is not set)
fi
if test ! -d "$P7ZIP_SOURCE_DIR/C"; then
AC_MSG_FAILURE($P7ZIP_SOURCE_DIR/C is invalid)
fi
if test ! -d "$P7ZIP_SOURCE_DIR/CPP"; then
AC_MSG_FAILURE(P7ZIP_SOURCE_DIR is invalid)
fi
dnl create link for p7zip source
AC_CONFIG_COMMANDS([p7zip_src_cpp_link], [ln -sf $P7ZIP_SOURCE_DIR/CPP includes/CPP])
AC_CONFIG_COMMANDS([p7zip_src_c_link], [ln -sf $P7ZIP_SOURCE_DIR/C includes/C])
AC_CONFIG_FILES([
Makefile
includes/Makefile
Lib7Zip/Makefile
Test7Zip/Makefile
])
AC_OUTPUT