]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
configure: Revert back the static libevent path
authorDavid Goulet <dgoulet@torproject.org>
Fri, 11 Dec 2020 14:52:23 +0000 (09:52 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Fri, 11 Dec 2020 14:52:23 +0000 (09:52 -0500)
From c618c4f27986825df2026fb22b8ee222edd1afa1, we changed the static
libevent.a path to be able to use the git repository or tarball directly but
that broke the "make install" setup that Tor Browser is using with Android.

In other words, the git repository and tarball put the "libevent.a" in
".libs/" where "make install" puts it in "lib/".

Using the --with-libevent-dir=..., which is mandatory for static libevent,
autoconf will take the path and use it for the includes (-I) and library (-L)
for which if it finds a "include/" and a "lib/" in the root, it will use
those.

However, with the git repo or tarball, the "lib/" doesn't exists thus autoconf
sets the library search path to be at the root and thus fails to find the
libevent.a in ".libs/".

This is a whole lot more work to make both cases work in our configure.ac thus
I'm reverting the change here to the Tor Browser case works again and the work
around for others is to either symlink the libevent.a at the root or use a
temporary make install directory.

One long term fix here would likely be to ask libevent to symblink the .a into
the root along the .la files and likely do the same for .so. Or, use the
"lib/" structure to contain the .a + .so files. Would be better than doing
ninji-tsu in our configure.ac

Fixes #40225

Signed-off-by: David Goulet <dgoulet@torproject.org>
configure.ac

index 83f6ad1821ad640663bb946b46d6410315fd4c70..1c3fa7d15cb02dc667a9f5f84722e50ccc067c24 100644 (file)
@@ -954,7 +954,7 @@ if test "$enable_static_libevent" = "yes"; then
    if test "$tor_cv_library_libevent_dir" = "(system)"; then
      AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent")
    else
-     TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/.libs/libevent.a $STATIC_LIBEVENT_FLAGS"
+     TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a $STATIC_LIBEVENT_FLAGS"
    fi
 else
      if test "x$ac_cv_header_event2_event_h" = "xyes"; then