Build fixes for recent libc versions (post glibc 2.19)
[sxemacs] / configure.ac
index cdf5e68..48a1d29 100644 (file)
@@ -9,7 +9,7 @@ dnl Autoconf startup.
 dnl -------------------------------------------------------------------------
 
 AC_PREREQ([2.62])
-AC_INIT([SXEmacs], [SXEM4CS_VERSION], [http://issues.sxemacs.org/])
+AC_INIT([SXEmacs], [SXEM4CS_VERSION], [https://issues.sxemacs.org/])
 AC_CONFIG_HEADER([src/config.h])
 AC_CONFIG_SRCDIR([src/lisp.h])
 AC_CONFIG_AUX_DIR([.])
@@ -308,7 +308,7 @@ OG_ARG_WITH([debug-malloc],
 OG_ARG_WITH([system-malloc],
        AS_HELP_STRING([--with-system-malloc],
                [Use a system malloc instead of GNU.]),
-       [default], [YES if using quantify or purify; NO otherwise])
+       [yes], [YES])
 
 OG_ARG_WITH([regex-malloc],
        AS_HELP_STRING([--with-regex-malloc],
@@ -823,9 +823,9 @@ AM_INIT_AUTOMAKE(m4_esyscmd([
    automake_minor=`echo "$automake_ver" | sed -e 's/^.* [0-9]*\.\([0-9]*\).*/\1/'`
    if test "$automake_major" = "1" -a "$automake_minor" -lt "14"
    then
-      echo "foreign -Wall"
+      echo "foreign -Wall -Wno-override -Wno-portability"
    else
-      echo "info-in-builddir foreign -Wall"
+      echo "info-in-builddir foreign -Wall -Wno-override -Wno-portability"
    fi]))
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
@@ -1565,7 +1565,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
 int main (int argc, char *argv[])
 {
   int fd = -1;
-  caddr_t p;
+
 #ifndef MAP_ANONYMOUS
   fd = open ("/dev/zero", O_RDWR);
   if (fd < 0)
@@ -1709,7 +1709,7 @@ dnl Check for POSIX functions.
 dnl ----------------------------------------------------------------
 
 SXE_CHECK_BASIC_FUNS
-AC_CHECK_FUNCS([alarm cbrt closedir dup2 eaccess endpwent floor fmod fpathconf frexp fsync ftime ftruncate getaddrinfo getcwd gethostbyname gethostname getnameinfo getpagesize getrlimit gettimeofday getwd isascii isatty link logb lrand48 matherr memchr memmove memset mkdir mktime munmap perror poll pow putenv random re_comp readlink regcomp rename res_init rint rmdir select setitimer setlocale setpgid setsid sigblock sighold sigprocmask snprintf socket sqrt stpcpy strncpy strncat strcasecmp strchr strdup strerror strlwr strrchr strspn strtol strupr symlink ttyname tzset ulimit umask uname usleep utime vlimit vsnprintf waitpid wcscmp wcslen])
+AC_CHECK_FUNCS([alarm cbrt closedir dup2 eaccess endpwent floor fmod fpathconf frexp fsync ftime ftruncate getaddrinfo getcwd gethostbyname gethostname getnameinfo getpagesize getrlimit gettimeofday getwd isascii isatty link logb log2 log2f log2l log10 log10f log10l log logf logl lrand48 matherr memchr memmove memset mkdir mktime munmap perror poll pow putenv random re_comp readlink regcomp rename res_init rint rmdir select setitimer setlocale setpgid setsid sigblock sighold sigprocmask snprintf socket sqrt stpcpy strncpy strncat strcasecmp strchr strdup strerror strlwr strrchr strspn strtol strupr symlink ttyname tzset ulimit umask uname usleep utime vlimit vsnprintf waitpid wcscmp wcslen])
 
 AS_IF([test "$have_isatty" = "yes"],
        AC_DEFINE([HAVE_ISATTY], [1], [isatty is available]))
@@ -1899,7 +1899,7 @@ SXE_CHECK_SUFFICIENCY([ffi], [FFI support], [
        ## additional actions
        AC_DEFINE([HAVE_LIBFFI], [1], [Description here!])
        HAVE_LIBFFI=yes
-       FFI_LIBS="-lffi"
+       FFI_LIBS="-lffi -ldl"
        SXE_ADD_CRUFT_OBJS([effi.o])
 ])
 
@@ -3312,8 +3312,8 @@ if test "$with_media_ffmpeg" != "no"; then
 
        if test "$have_media_ffmpeg" = "yes"; then
                AC_MSG_RESULT([yes])
-               FFMPEG_LIBS=`$PKG_CONFIG --libs libavformat`
-               FFMPEG_CPPFLAGS=`$PKG_CONFIG --cflags libavformat`
+               FFMPEG_LIBS=`$PKG_CONFIG --libs libavformat libavcodec libavutil`
+               FFMPEG_CPPFLAGS=`$PKG_CONFIG --cflags libavformat libavcodec libavutil`
                SXE_PREPEND($FFMPEG_LIBS, MM_LIBS)
                SXE_PREPEND_UNDUP($FFMPEG_CPPFLAGS, MM_CPPFLAGS)
                SXE_ADD_MM_OBJS([media-ffmpeg.o])
@@ -3899,7 +3899,7 @@ done
 AC_SUBST(INFOPATH)
 
 if test -z "$with_module_path"; then
-    with_module_path="~/.sxemacs/${configuration}/modules:${libdir}/${PROGNAME}/${configuration}/site-modules:${libdir}/${instvardir}/${configuration}/modules"
+    with_module_path="~/.config/sxemacs/${configuration}/modules:${libdir}/${PROGNAME}/${configuration}/site-modules:${libdir}/${instvardir}/${configuration}/modules"
 fi
 
 AC_SUBST(module_path,$with_module_path)
@@ -3919,10 +3919,10 @@ fi
 
 if test -z "$with_package_path" && test -n "$with_package_prefix" ; then
   if test "$with_mule" = "yes" ; then
-    with_package_path="~/.sxemacs/site-packages:~/.sxemacs/sxemacs-packages:~/.sxemacs/xemacs-packages:~/.sxemacs/mule-packages"
+    with_package_path="~/.local/share/sxemacs/site-packages:~/.local/share/sxemacs/sxemacs-packages:~/.local/share/sxemacs/xemacs-packages:~/.local/share/sxemacs/mule-packages"
     with_package_path="${with_package_path}:${with_package_prefix}/site-packages:${with_package_prefix}/sxemacs-packages:${with_package_prefix}/xemacs-packages:${with_package_prefix}/mule-packages"
   else
-    with_package_path="~/.sxemacs/site-packages:~/.sxemacs/sxemacs-packages:~/.sxemacs/xemacs-packages"
+    with_package_path="~/.local/share/sxemacs/site-packages:~/.local/share/sxemacs/sxemacs-packages:~/.local/share/sxemacs/xemacs-packages"
     with_package_path="${with_package_path}:${with_package_prefix}/site-packages:${with_package_prefix}/sxemacs-packages:${with_package_prefix}/xemacs-packages"
   fi
 fi
@@ -4113,6 +4113,9 @@ if test "$GNU_MALLOC" = "yes"; then
                :
        fi
 elif test "$with_system_malloc" = "yes" -o "$system_malloc" = "yes"; then
+       if test "$after_morecore_hook_exists" = "yes"; then
+               SXE_ADD_MEMALLOC_OBJS(vm-limit.o)
+       fi
        AC_DEFINE([USE_SYSTEM_MALLOC], [1], [Description here!])
        AC_DEFINE([SYSTEM_MALLOC], [1], [Description here!])
 elif test "$with_debug_malloc"  = "yes"; then