Add the 'noerror' argument to #'require.
[sxemacs] / configure.ac
index de6d160..ec40bfb 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([.])
@@ -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])
@@ -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]))
@@ -2952,24 +2952,140 @@ AS_IF([test "$with_tty" != "no"],[
    if test -n "$curses_h_file"; then
        AC_DEFINE_UNQUOTED([HAVE_CURSES_H], [1],
                           [There is a curses.h header file available])
+       AC_DEFINE_UNQUOTED([CURSES_H_FILE], ["${curses_h_file}"],
+                          [The curses.h header file])
    fi
 
    if test -n "$termcap_h_file"; then
        AC_DEFINE_UNQUOTED([HAVE_TERMCAP_H], [1],
                           [There is a termcap.h header available])
+       AC_DEFINE_UNQUOTED([TERMCAP_H_FILE], ["${termcap_h_file}"],
+                          [The termcap.h header file])
    fi
 
    if test -n "$term_h_file"; then
        AC_DEFINE_UNQUOTED([HAVE_TERM_H], [1],
                           [There is a term.h header available])
+       AC_DEFINE_UNQUOTED([TERM_H_FILE], ["${term_h_file}"],
+                          [The term.h header file])
    fi
 
-   AC_DEFINE_UNQUOTED([CURSES_H_FILE], ["${curses_h_file-curses.h}"],
-                      [The curses.h header file])
-   AC_DEFINE_UNQUOTED([TERMCAP_H_FILE], ["${termcap_h_file-termcap.h}"],
-                      [The termcap.h header file])
-   AC_DEFINE_UNQUOTED([TERM_H_FILE], ["${term_h_file-term.h}"],
-                      [The term.h header file])
+   # Finally let's see if we have prototype for the elusive tparm
+   AC_MSG_CHECKING(for tparm prototype)
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef TERM_H_FILE
+#include TERM_H_FILE
+#endif
+#ifdef TERMCAP_H_FILE
+#include TERMCAP_H_FILE
+#endif
+#ifdef CURSES_H_FILE
+#include CURSES_H_FILE
+#endif
+/* Completely incompatible prototype with all tparm ones
+   if files above define it, compilation should fail
+*/
+extern void tparm(void);
+       ]], [[ tparm(); ]])],
+       [AC_MSG_RESULT(no)],
+       [AC_MSG_RESULT(yes)
+         AC_DEFINE_UNQUOTED([HAVE_TPARM_PROTOTYPE], [1],
+                           [tparm has a prototype defined])])
+
+   # Finally let's see if we have prototype for tgetent
+   AC_MSG_CHECKING(for tgetent prototype)
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef TERM_H_FILE
+#include TERM_H_FILE
+#endif
+#ifdef TERMCAP_H_FILE
+#include TERMCAP_H_FILE
+#endif
+#ifdef CURSES_H_FILE
+#include CURSES_H_FILE
+#endif
+extern void tgetent(void);
+       ]], [[ tgetent(); ]])],
+       [AC_MSG_RESULT(no)],
+       [AC_MSG_RESULT(yes)
+         AC_DEFINE_UNQUOTED([HAVE_TGETENT_PROTOTYPE], [1],
+                           [tgetent has a prototype defined])])
+
+
+   # Finally let's see if we have prototype for tgetflag
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef TERM_H_FILE
+#include TERM_H_FILE
+#endif
+#ifdef TERMCAP_H_FILE
+#include TERMCAP_H_FILE
+#endif
+#ifdef CURSES_H_FILE
+#include CURSES_H_FILE
+#endif
+extern void tgetflag(void);
+       ]], [[ tgetflag(); ]])],
+       [AC_MSG_RESULT(no)],
+       [AC_MSG_RESULT(yes)
+         AC_DEFINE_UNQUOTED([HAVE_TGETFLAG_PROTOTYPE], [1],
+                                [tgetflag has a prototype defined])])
+
+   # Finally let's see if we have prototype for tgetnum
+   AC_MSG_CHECKING(for tgetnum prototype)
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef TERM_H_FILE
+#include TERM_H_FILE
+#endif
+#ifdef TERMCAP_H_FILE
+#include TERMCAP_H_FILE
+#endif
+#ifdef CURSES_H_FILE
+#include CURSES_H_FILE
+#endif
+extern void tgetnum(void);
+       ]], [[ tgetnum(); ]])],
+       [AC_MSG_RESULT(no)],
+       [AC_MSG_RESULT(yes)
+        AC_DEFINE_UNQUOTED([HAVE_TGETNUM_PROTOTYPE], [1],
+                           [tgetnum has a prototype defined])])
+
+   # Finally let's see if we have prototype for tgetnum
+   AC_MSG_CHECKING(for tgetstr prototype)
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef TERM_H_FILE
+#include TERM_H_FILE
+#endif
+#ifdef TERMCAP_H_FILE
+#include TERMCAP_H_FILE
+#endif
+#ifdef CURSES_H_FILE
+#include CURSES_H_FILE
+#endif
+extern void tgetstr(void);
+       ]], [[ tgetstr(); ]])],
+       [AC_MSG_RESULT(no)],
+        [AC_MSG_RESULT(yes)
+        AC_DEFINE_UNQUOTED([HAVE_TGETSTR_PROTOTYPE], [1],
+                           [tgetstr has a prototype defined])])
+
+   # Finally let's see if we have prototype for tgetnum
+   AC_MSG_CHECKING(for tputs prototype)
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef TERM_H_FILE
+#include TERM_H_FILE
+#endif
+#ifdef TERMCAP_H_FILE
+#include TERMCAP_H_FILE
+#endif
+#ifdef CURSES_H_FILE
+#include CURSES_H_FILE
+#endif
+extern void tputs(void);
+       ]], [[ tputs(); ]])],
+       [AC_MSG_RESULT(no)],
+       [AC_MSG_RESULT(yes)
+         AC_DEFINE_UNQUOTED([HAVE_TPUTS_PROTOTYPE], [1],
+                           [tputs has a prototype defined])])
 ],[
   for feature in ncurses curses termcap terminfo termlib gpm; do
     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
@@ -3196,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])
@@ -3783,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)
@@ -3803,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