Skip to content

Commit 83a3add

Browse files
committed
Build System: backport from master
See commits bcae7b4e445e149179b4...e2872439e4a6f4eb353e for details.
1 parent 152b920 commit 83a3add

File tree

8 files changed

+3102
-1160
lines changed

8 files changed

+3102
-1160
lines changed

configure

+2,782-915
Large diffs are not rendered by default.

configure.ac

+189-204
Large diffs are not rendered by default.

extra.mk.in

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ VERSION ?= @VERSION@
122122
prefix ?= @prefix@
123123
CRACKLIB_C ?= @CRACKLIB_C@
124124
CRACKLIB_LIBS ?= @CRACKLIB_LIBS@
125+
LIBIDN_LIBS ?= @LIBIDN_LIBS@
125126
CONTRIB_ENABLE ?= @CONTRIB_ENABLE@
126127
PERL_ENABLE ?= @PERL_ENABLE@
127128
PERL_CFLAGS ?= @PERL_CFLAGS@

include/sysconf.h.in

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/* Define to 1 if you have the `asprintf' function. */
2020
#undef HAVE_ASPRINTF
2121

22-
/* Define if crypt() is available */
22+
/* Define to 1 if crypt(3) is available */
2323
#undef HAVE_CRYPT
2424

2525
/* Define if the GNU dcgettext() function is already present or preinstalled.
@@ -32,6 +32,9 @@
3232
/* Define to 1 if you have the `explicit_bzero' function. */
3333
#undef HAVE_EXPLICIT_BZERO
3434

35+
/* Define to 1 if you have the `flock' function. */
36+
#undef HAVE_FLOCK
37+
3538
/* Define to 1 if you have the `fork' function. */
3639
#undef HAVE_FORK
3740

@@ -62,6 +65,9 @@
6265
/* Define to 1 if you have the <inttypes.h> header file. */
6366
#undef HAVE_INTTYPES_H
6467

68+
/* Define to 1 if we have GNU libidn available. */
69+
#undef HAVE_LIBIDN
70+
6571
/* Define to 1 if you have the `nsl' library (-lnsl). */
6672
#undef HAVE_LIBNSL
6773

@@ -92,7 +98,7 @@
9298
/* Define to 1 if you have the `memset_s' function. */
9399
#undef HAVE_MEMSET_S
94100

95-
/* Define to 1 if openssl is available */
101+
/* Define to 1 if OpenSSL is available */
96102
#undef HAVE_OPENSSL
97103

98104
/* Define to 1 if you have the <openssl/ec.h> header file. */

m4/atheme-c.m4

-36
This file was deleted.

m4/atheme-cflags.m4

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ATHEME_CC_TEST_CFLAGS_RESULT="no"
2+
3+
AC_DEFUN([ATHEME_CC_TEST_CFLAGS],
4+
[
5+
AC_MSG_CHECKING([for C compiler flag(s) $1 ])
6+
7+
CFLAGS_SAVED="${CFLAGS}"
8+
CFLAGS="${CFLAGS} $1"
9+
10+
AC_COMPILE_IFELSE(
11+
[
12+
AC_LANG_PROGRAM([[]], [[]])
13+
], [
14+
ATHEME_CC_TEST_CFLAGS_RESULT='yes'
15+
], [
16+
ATHEME_CC_TEST_CFLAGS_RESULT='no'
17+
CFLAGS="${CFLAGS_SAVED}"
18+
]
19+
)
20+
21+
AC_MSG_RESULT([${ATHEME_CC_TEST_CFLAGS_RESULT}])
22+
unset CFLAGS_SAVED
23+
]
24+
)

m4/atheme-warnings.m4

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
AC_DEFUN([ATHEME_CC_ENABLE_WARNINGS],
2+
[
3+
ATHEME_CC_TEST_CFLAGS([-Werror=unknown-warning-option])
4+
ATHEME_CC_TEST_CFLAGS([-Werror=implicit])
5+
6+
ATHEME_CC_TEST_CFLAGS([-Weverything])
7+
8+
AS_IF([test "x${ATHEME_CC_TEST_CFLAGS_RESULT}" = "xyes"],
9+
[
10+
11+
ATHEME_CC_TEST_CFLAGS([-Wno-address-of-packed-member])
12+
ATHEME_CC_TEST_CFLAGS([-Wno-disabled-macro-expansion])
13+
ATHEME_CC_TEST_CFLAGS([-Wno-format-pedantic])
14+
ATHEME_CC_TEST_CFLAGS([-Wno-missing-variable-declarations])
15+
ATHEME_CC_TEST_CFLAGS([-Wno-pedantic])
16+
ATHEME_CC_TEST_CFLAGS([-Wno-reserved-id-macro])
17+
ATHEME_CC_TEST_CFLAGS([-Wno-unused-command-line-argument])
18+
19+
], [
20+
21+
ATHEME_CC_TEST_CFLAGS([-Wall])
22+
ATHEME_CC_TEST_CFLAGS([-Wextra])
23+
24+
ATHEME_CC_TEST_CFLAGS([-Waggregate-return])
25+
ATHEME_CC_TEST_CFLAGS([-Waggressive-loop-optimizations])
26+
ATHEME_CC_TEST_CFLAGS([-Walloc-zero])
27+
ATHEME_CC_TEST_CFLAGS([-Walloca])
28+
ATHEME_CC_TEST_CFLAGS([-Wbad-function-cast])
29+
ATHEME_CC_TEST_CFLAGS([-Wc99-c11-compat])
30+
ATHEME_CC_TEST_CFLAGS([-Wcast-qual])
31+
ATHEME_CC_TEST_CFLAGS([-Wdangling-else])
32+
ATHEME_CC_TEST_CFLAGS([-Wdate-time])
33+
ATHEME_CC_TEST_CFLAGS([-Wdisabled-optimization])
34+
ATHEME_CC_TEST_CFLAGS([-Wdouble-promotion])
35+
ATHEME_CC_TEST_CFLAGS([-Wduplicated-branches])
36+
ATHEME_CC_TEST_CFLAGS([-Wduplicated-cond])
37+
ATHEME_CC_TEST_CFLAGS([-Wfatal-errors])
38+
ATHEME_CC_TEST_CFLAGS([-Wfloat-equal])
39+
ATHEME_CC_TEST_CFLAGS([-Wformat-nonliteral])
40+
ATHEME_CC_TEST_CFLAGS([-Wformat-security])
41+
ATHEME_CC_TEST_CFLAGS([-Wformat-signedness])
42+
ATHEME_CC_TEST_CFLAGS([-Wformat-y2k])
43+
ATHEME_CC_TEST_CFLAGS([-Winline])
44+
ATHEME_CC_TEST_CFLAGS([-Winit-self])
45+
ATHEME_CC_TEST_CFLAGS([-Winvalid-pch])
46+
ATHEME_CC_TEST_CFLAGS([-Wjump-misses-init])
47+
ATHEME_CC_TEST_CFLAGS([-Wlogical-op])
48+
ATHEME_CC_TEST_CFLAGS([-Wmissing-declarations])
49+
ATHEME_CC_TEST_CFLAGS([-Wmissing-format-attribute])
50+
ATHEME_CC_TEST_CFLAGS([-Wmissing-include-dirs])
51+
ATHEME_CC_TEST_CFLAGS([-Wmissing-prototypes])
52+
ATHEME_CC_TEST_CFLAGS([-Wnested-externs])
53+
ATHEME_CC_TEST_CFLAGS([-Wnormalized=nfkc])
54+
ATHEME_CC_TEST_CFLAGS([-Wnull-dereference])
55+
ATHEME_CC_TEST_CFLAGS([-Wold-style-definition])
56+
ATHEME_CC_TEST_CFLAGS([-Woverlength-strings])
57+
ATHEME_CC_TEST_CFLAGS([-Wpointer-arith])
58+
ATHEME_CC_TEST_CFLAGS([-Wpointer-compare])
59+
ATHEME_CC_TEST_CFLAGS([-Wredundant-decls])
60+
ATHEME_CC_TEST_CFLAGS([-Wregister])
61+
ATHEME_CC_TEST_CFLAGS([-Wrestrict])
62+
ATHEME_CC_TEST_CFLAGS([-Wshadow])
63+
ATHEME_CC_TEST_CFLAGS([-Wstack-protector])
64+
65+
ATHEME_CC_TEST_CFLAGS([-Wstrict-overflow=3])
66+
AS_IF([test "x${ATHEME_CC_TEST_CFLAGS_RESULT}" = "xno"],
67+
[ATHEME_CC_TEST_CFLAGS([-Wstrict-overflow])]
68+
)
69+
70+
ATHEME_CC_TEST_CFLAGS([-Wstrict-prototypes])
71+
ATHEME_CC_TEST_CFLAGS([-Wstringop-overflow=4])
72+
ATHEME_CC_TEST_CFLAGS([-Wstringop-truncation])
73+
ATHEME_CC_TEST_CFLAGS([-Wtrampolines])
74+
ATHEME_CC_TEST_CFLAGS([-Wundef])
75+
ATHEME_CC_TEST_CFLAGS([-Wunsafe-loop-optimizations])
76+
ATHEME_CC_TEST_CFLAGS([-Wunsuffixed-float-constants])
77+
ATHEME_CC_TEST_CFLAGS([-Wunused])
78+
ATHEME_CC_TEST_CFLAGS([-Wvla])
79+
ATHEME_CC_TEST_CFLAGS([-Wwrite-strings])
80+
81+
]
82+
)
83+
84+
ATHEME_CC_TEST_CFLAGS([-Wno-cast-align])
85+
ATHEME_CC_TEST_CFLAGS([-Wno-conversion])
86+
ATHEME_CC_TEST_CFLAGS([-Wno-inline])
87+
ATHEME_CC_TEST_CFLAGS([-Wno-missing-declarations])
88+
ATHEME_CC_TEST_CFLAGS([-Wno-missing-include-dirs])
89+
ATHEME_CC_TEST_CFLAGS([-Wno-missing-prototypes])
90+
ATHEME_CC_TEST_CFLAGS([-Wno-packed])
91+
ATHEME_CC_TEST_CFLAGS([-Wno-padded])
92+
ATHEME_CC_TEST_CFLAGS([-Wno-sign-conversion])
93+
ATHEME_CC_TEST_CFLAGS([-Wno-suggest-attribute=format])
94+
ATHEME_CC_TEST_CFLAGS([-Wno-unused-parameter])
95+
ATHEME_CC_TEST_CFLAGS([-Wno-unused-variable])
96+
]
97+
)

modules/crypto/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ include ../../buildsys.mk
2222
include ../../buildsys.module.mk
2323

2424
CPPFLAGS += -I../../include
25-
LIBS += ${SSL_LIBS}
26-
LIBS += -L../../libathemecore -lathemecore ${LDFLAGS_RPATH}
27-
25+
LIBS += -L../../libathemecore -lathemecore ${LDFLAGS_RPATH} ${SSL_LIBS} ${LIBIDN_LIBS}

0 commit comments

Comments
 (0)