forked from GangZhuo/BaiduPCS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
68 lines (57 loc) · 1.49 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
67
68
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([baidupcs], [0.2.6], [https://github.com/GangZhuo/BaiduPCS])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([arg.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
dnl Check for lib
AC_ENABLE_STATIC
AC_ENABLE_SHARED
LT_INIT
AM_INIT_AUTOMAKE([subdir-objects foreign])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
dnl pthread first
ACX_PTHREAD
AX_CHECK_OPENSSL
AX_LIB_CRYPTO([auto])
LIBS="$OPENSSL_LIBS $PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
dnl Add library linking for mingw
case $host in
*-mingw*)
LIBS="$LIBS -lshlwapi"
;;
*-cygwin*)
LIBS="$LIBS -largp"
esac
dnl Check libcurl
AC_CHECK_LIB(
[curl],
[curl_version],
[LIBS="-lcurl $LIBS"],
[AC_MSG_FAILURE([Could not find libcurl.])]
)
# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([float.h inttypes.h limits.h locale.h malloc.h stddef.h stdint.h stdlib.h string.h termios.h unistd.h utime.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
# Checks for library functions.
AC_FUNC_FSEEKO
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_FUNC_STRNLEN
AC_CHECK_FUNCS([floor gettimeofday memmove memset mkdir pow rmdir setlocale strchr strstr strtol utime])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT