diff --git a/autoconf/m4/unreal.m4 b/autoconf/m4/unreal.m4 index 00872dc45..5a93300a8 100644 --- a/autoconf/m4/unreal.m4 +++ b/autoconf/m4/unreal.m4 @@ -86,7 +86,7 @@ AC_DEFUN([CHECK_LIBCURL], dnl wants bundled c-ares + system libcURL, then we should filter out c-ares dnl flags. _Only_ in that case should we mess with the flags. -- ohnobinki - AS_IF([test "x$has_system_cares" = "xno" && test "x$HOME/curl" != "x$enable_curl" && test "x/usr/share/unreal-curl" != "x$enable_curl" && test "$CURLUSESCARES" != "0" ], + AS_IF([test "x$has_system_cares" = "xno" && test "x$BUILDDIR/extras/curl" != "x$enable_curl" && test "$CURLUSESCARES" != "0" ], [ AC_MSG_ERROR([[ diff --git a/configure b/configure index e495f1c24..86529b694 100755 --- a/configure +++ b/configure @@ -624,7 +624,6 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS -BUILDDIR UNRLINCDIR URL PTHREAD_CFLAGS @@ -688,6 +687,7 @@ CPPFLAGS LDFLAGS CFLAGS CC +BUILDDIR target_alias host_alias build_alias @@ -2530,6 +2530,9 @@ fi orig_cflags="$CFLAGS" +BUILDDIR="`pwd`" + + # Generation version number (e.g.: X in X.Y.Z) UNREAL_VERSION_GENERATION="4" @@ -8499,7 +8502,7 @@ $as_echo "$as_me: WARNING: CURLLIBS is empty, that probably means that I could n fi - if test "x$has_system_cares" = "xno" && test "x$HOME/curl" != "x$enable_curl" && test "x/usr/share/unreal-curl" != "x$enable_curl" && test "$CURLUSESCARES" != "0" ; then : + if test "x$has_system_cares" = "xno" && test "x$BUILDDIR/extras/curl" != "x$enable_curl" && test "$CURLUSESCARES" != "0" ; then : as_fn_error $? " @@ -8570,9 +8573,6 @@ fi UNRLINCDIR="`pwd`/include" -BUILDDIR="`pwd`" - - ac_config_files="$ac_config_files Makefile src/Makefile src/modules/Makefile src/modules/chanmodes/Makefile src/modules/usermodes/Makefile src/modules/snomasks/Makefile src/modules/extbans/Makefile src/modules/third/Makefile unrealircd" cat >confcache <<\_ACEOF diff --git a/configure.ac b/configure.ac index f497f3a1f..e8c965e6c 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,10 @@ fi dnl Save CFLAGS, use this when building the libraries like c-ares orig_cflags="$CFLAGS" +dnl Save build directory early on (used in our m4 macros too) +BUILDDIR="`pwd`" +AC_SUBST(BUILDDIR) + dnl Calculate the versions. Perhaps the use of expr is a little too extravagant # Generation version number (e.g.: X in X.Y.Z) UNREAL_VERSION_GENERATION=["4"] @@ -857,9 +861,6 @@ CHECK_LIBCURL UNRLINCDIR="`pwd`/include" AC_SUBST(UNRLINCDIR) -BUILDDIR="`pwd`" -AC_SUBST(BUILDDIR) - AC_CONFIG_FILES([Makefile src/Makefile src/modules/Makefile