diff options
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | toxcore/Makefile.inc | 5 |
2 files changed, 16 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 3a0fd0ab..64d53dec 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -10,6 +10,17 @@ AM_INIT_AUTOMAKE([1.10 -Wall]) | |||
10 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | 10 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
11 | AC_CONFIG_MACRO_DIR([m4]) | 11 | AC_CONFIG_MACRO_DIR([m4]) |
12 | 12 | ||
13 | LIBTOXCORE_LT_VERSION=0:0:0 | ||
14 | dnl | ||
15 | dnl current:revision:age | ||
16 | dnl | ||
17 | dnl current: increment if interfaces have been added, removed or changed | ||
18 | dnl revision: increment if source code has changed, set to zero if current is | ||
19 | dnl incremented | ||
20 | dnl age: increment if interfaces have been added, set to zero if | ||
21 | dnl interfaces have been removed or changed | ||
22 | EXTRA_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" | ||
23 | |||
13 | if test "x${prefix}" = "xNONE"; then | 24 | if test "x${prefix}" = "xNONE"; then |
14 | prefix="${ac_default_prefix}" | 25 | prefix="${ac_default_prefix}" |
15 | fi | 26 | fi |
@@ -106,6 +117,7 @@ case $host_os in | |||
106 | WIN32="yes" | 117 | WIN32="yes" |
107 | AC_MSG_WARN([nTox is not supported on $host_os yet, disabling]) | 118 | AC_MSG_WARN([nTox is not supported on $host_os yet, disabling]) |
108 | BUILD_NTOX="no" | 119 | BUILD_NTOX="no" |
120 | EXTRA_LT_LDFLAGS="$EXTRA_LT_LDFLAGS -no-undefined" | ||
109 | ;; | 121 | ;; |
110 | *solaris*) | 122 | *solaris*) |
111 | LIBS="$LIBS -lssp -lsocket -lnsl" | 123 | LIBS="$LIBS -lssp -lsocket -lnsl" |
@@ -118,6 +130,8 @@ case $host_os in | |||
118 | esac | 130 | esac |
119 | AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes") | 131 | AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes") |
120 | 132 | ||
133 | AC_SUBST(EXTRA_LT_LDFLAGS) | ||
134 | |||
121 | # Checks for libraries. | 135 | # Checks for libraries. |
122 | LIBSODIUM_LIBS= | 136 | LIBSODIUM_LIBS= |
123 | LIBSODIUM_LDFLAGS= | 137 | LIBSODIUM_LDFLAGS= |
@@ -137,7 +151,7 @@ else | |||
137 | AC_CHECK_LIB(sodium, randombytes_random, | 151 | AC_CHECK_LIB(sodium, randombytes_random, |
138 | [], | 152 | [], |
139 | [ | 153 | [ |
140 | AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/]) | 154 | AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/]) |
141 | ] | 155 | ] |
142 | ) | 156 | ) |
143 | fi | 157 | fi |
diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index 90912a59..da07db41 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | LIBTOXCORE_VERSION = 0:0:0 | ||
2 | |||
3 | lib_LTLIBRARIES = libtoxcore.la | 1 | lib_LTLIBRARIES = libtoxcore.la |
4 | 2 | ||
5 | libtoxcore_la_include_HEADERS = \ | 3 | libtoxcore_la_include_HEADERS = \ |
@@ -33,8 +31,7 @@ libtoxcore_la_CFLAGS = -I$(top_srcdir) \ | |||
33 | -I$(top_srcdir)/toxcore \ | 31 | -I$(top_srcdir)/toxcore \ |
34 | $(LIBSODIUM_CFLAGS) | 32 | $(LIBSODIUM_CFLAGS) |
35 | 33 | ||
36 | libtoxcore_la_LDFLAGS = -version-info $(LIBTOXCORE_VERSION) \ | 34 | libtoxcore_la_LDFLAGS = $(EXTRA_LT_LDFLAGS) \ |
37 | -no-undefined \ | ||
38 | $(LIBSODIUM_LDFLAGS) \ | 35 | $(LIBSODIUM_LDFLAGS) \ |
39 | $(WINSOCK2_LIBS) | 36 | $(WINSOCK2_LIBS) |
40 | 37 | ||