-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
57 lines (48 loc) · 2.01 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([linear-objc], [0.7.0], [https://github.com/linear-rpc/linear-objc])
AC_CONFIG_AUX_DIR(m4)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_SRCDIR([include/LinearClient.h])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# -fobjc-arc
# enable to use ARC(Automatic Reference Counting)
# -fmessage-length
# http://stackoverflow.com/questions/12015624/what-is-meanging-of-gcc-option-fmessage-length
# -fpascal-strings
# Enable support for Pascal-style strings with "\pfoo".
# -Wno-trigraphs
# http://stackoverflow.com/questions/8435379/trigraph-ignored-use-trigraphs-to-enable
OBJCFLAGS="$OBJCFLAGS -fobjc-arc -fmessage-length=0 -fpascal-strings -Wno-trigraphs"
OBJCXXFLAGS="$OBJCXXFLAGS -fobjc-arc -fmessage-length=0 -fpascal-strings -Wno-trigraphs"
# Checks for programs.
AC_PROG_OBJC
AC_PROG_OBJCXX
AC_PROG_LIBTOOL
# TODO: add more warning options.
OBJCFLAGS="$OBJCFLAGS -Wall -Werror"
OBJCXXFLAGS="$OBJCXXFLAGS -Wall -Werror"
AC_ARG_WITH([ssl],
[AC_HELP_STRING([--with-ssl], [supports SSL transport by using OpenSSL@<:@default=no@:>@])],
[with_ssl=$withval], [with_ssl=no])
if test "x$with_ssl" = "xyes"; then
OBJCFLAGS="$OBJCFLAGS -DWITH_SSL -I`pwd`/deps/Build-OpenSSL-cURL/openssl/iOS-fat/include"
OBJCXXFLAGS="$OBJCXXFLAGS -DWITH_SSL -I`pwd`/deps/Build-OpenSSL-cURL/openssl/iOS-fat/include"
LDFLAGS="$LDFLAGS -L`pwd`/deps/Build-OpenSSL-cURL/openssl/iOS-fat/lib"
LIBS="$LIBS -lssl -lcrypto"
elif test "x${with_ssl}" != "xno"; then
OBJCFLAGS="$OBJCFLAGS -DWITH_SSL -I$with_ssl/include"
OBJCXXFLAGS="$OBJCXXFLAGS -DWITH_SSL -I$with_ssl/include"
LDFLAGS="$LDFLAGS -L$with_ssl/lib"
LIBS="$LIBS -lssl -lcrypto"
fi
AM_CONDITIONAL([WITH_SSL], [test "x${with_ssl}" != "xno"])
AC_CONFIG_FILES([
Makefile
include/Makefile
src/Makefile
])
AC_CONFIG_SUBDIRS(deps/linear-cpp)
AC_OUTPUT