ObjOpenSSL  Check-in [f428f5f216]

Overview
Comment:configure: Avoid adding flags twice
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f428f5f216875d7abe353b7b3a43816dfd0345f20dd8d0c0e25edc8cccdfe6a3
User & Date: js on 2020-08-29 14:36:25
Other Links: manifest | tags
Context
2020-08-29
14:42
Fix compilation on Windows check-in: 5492e91aad user: js tags: trunk
14:36
configure: Avoid adding flags twice check-in: f428f5f216 user: js tags: trunk
14:26
Update buildsys check-in: a55162a23e user: js tags: trunk
Changes

Modified configure.ac from [ebd3cbd325] to [2461ea6b14].

1
2
3
4
5






6
7
8
9
10
11
12
AC_INIT(ObjOpenSSL, 0.1, js@nil.im)

AC_CONFIG_SRCDIR(src)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(build-aux/m4)







AC_CHECK_TOOL(OBJFW_CONFIG, objfw-config)
AS_IF([test x"$OBJFW_CONFIG" = x""], [
       AC_MSG_ERROR(You need ObjFW and objfw-config installed!)
])

test x"$OBJC" = x"" && OBJC="$($OBJFW_CONFIG --objc)"

<



>
>
>
>
>
>







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
AC_INIT(ObjOpenSSL, 0.1, js@nil.im)

AC_CONFIG_SRCDIR(src)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(build-aux/m4)

for i in configure.ac build-aux/m4/*; do
	AS_IF([test $i -nt configure], [
		AC_MSG_ERROR([$i is newer than configure! Run ./autogen.sh!])
	])
done

AC_CHECK_TOOL(OBJFW_CONFIG, objfw-config)
AS_IF([test x"$OBJFW_CONFIG" = x""], [
       AC_MSG_ERROR(You need ObjFW and objfw-config installed!)
])

test x"$OBJC" = x"" && OBJC="$($OBJFW_CONFIG --objc)"
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	AC_PROG_RANLIB
	AC_SUBST(OBJOPENSSL_STATIC_LIB, "libobjopenssl.a")
])

AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl=PREFIX],
	[build with OpenSSL in the specified prefix]))
AS_IF([test x"$with_openssl" != x"no" -a x"$with_openssl" != x""], [
       OPENSSL_CPPFLAGS="$CPPFLAGS -I$with_openssl/include"
       OPENSSL_LIBS="$LIBS -L$with_openssl/lib"
       CPPFLAGS="$CPPFLAGS $OPENSSL_CPPFLAGS"
       LIBS="$LIBS $OPENSSL_LIBS"
])

AC_CHECK_LIB(ssl, main, [
	OPENSSL_LIBS="$OPENSSL_LIBS -lssl -lcrypto"
	LIBS="$LIBS -lssl -lcrypto"
], [
	AC_MSG_ERROR(You need openssl >= 1.0.2 installed!)







|
|
|
|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	AC_PROG_RANLIB
	AC_SUBST(OBJOPENSSL_STATIC_LIB, "libobjopenssl.a")
])

AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl=PREFIX],
	[build with OpenSSL in the specified prefix]))
AS_IF([test x"$with_openssl" != x"no" -a x"$with_openssl" != x""], [
       OPENSSL_CPPFLAGS="$OPENSSL_CFLAGS -I$with_openssl/include"
       OPENSSL_LIBS="$OPENSSL_LIBS -L$with_openssl/lib"
       CPPFLAGS="$CPPFLAGS -I$with_openssl/include"
       LIBS="$LIBS -L$with_openssl/lib"
])

AC_CHECK_LIB(ssl, main, [
	OPENSSL_LIBS="$OPENSSL_LIBS -lssl -lcrypto"
	LIBS="$LIBS -lssl -lcrypto"
], [
	AC_MSG_ERROR(You need openssl >= 1.0.2 installed!)