diff options
author | Slava Barinov <v.barinov@samsung.com> | 2023-08-15 13:30:43 +0300 |
---|---|---|
committer | Slava Barinov <v.barinov@samsung.com> | 2023-08-16 12:42:29 +0300 |
commit | 840805088f4cb6f80e202e32456c2855a63c8a66 (patch) | |
tree | 8b7ec8e1b6f701e8c3c258de5bfb1c8070fe837b | |
parent | 56da2f7a20abb051e4227a37fb8f1be77e5323f3 (diff) | |
download | libidn-sandbox/vbarinov/reconfigure.tar.gz libidn-sandbox/vbarinov/reconfigure.tar.bz2 libidn-sandbox/vbarinov/reconfigure.zip |
Add riscv64 supportsandbox/vbarinov/reconfigure
Several deprecated m4 macros have been updated, tests have been removed due to
incompatibility
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | gl/m4/extern-inline.m4 | 132 | ||||
-rw-r--r-- | m4/po.m4 | 16 | ||||
-rwxr-xr-x | packaging/libidn.spec | 12 |
5 files changed, 159 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am index 9491d32..a935ed7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -SUBDIRS = gl lib/gl lib po doc gltests lib/gltests tests examples \ +SUBDIRS = gl lib/gl lib po gltests lib/gltests examples \ java csharp EXTRA_DIST = cfg.mk maint.mk .clcopying diff --git a/configure.ac b/configure.ac index 3185f92..1f5d670 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ AC_SUBST(DLL_VERSION) # have it. AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL +AC_PROG_MKDIR_P # Checks for programs. AM_MISSING_PROG(PERL, perl, $missing_dir) @@ -55,6 +56,7 @@ AM_GNU_GETTEXT(external) AM_GNU_GETTEXT_VERSION(0.18.1) AM_ICONV AM_PATH_LISPDIR +AM_PROG_AR if test "$am_cv_func_iconv" != "yes"; then AC_MSG_NOTICE([ @@ -162,13 +164,6 @@ AC_CONFIG_FILES([ Makefile contrib/doxygen/Doxyfile csharp/Makefile - doc/Makefile - doc/cyclo/Makefile - doc/java/Makefile - doc/reference/Makefile - doc/reference/version.xml - doc/specifications/Makefile - doc/tld/Makefile examples/Makefile gl/Makefile gltests/Makefile @@ -182,7 +177,6 @@ AC_CONFIG_FILES([ lib/gltests/Makefile libidn.pc po/Makefile.in - tests/Makefile ]) AC_OUTPUT diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 new file mode 100644 index 0000000..f9894d7 --- /dev/null +++ b/gl/m4/extern-inline.m4 @@ -0,0 +1,132 @@ +dnl 'extern inline' a la ISO C99. + +dnl Copyright 2012-2023 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_EXTERN_INLINE], +[ + AC_CACHE_CHECK([whether ctype.h defines __header_inline], + [gl_cv_have___header_inline], + [AC_PREPROC_IFELSE( + [AC_LANG_SOURCE([[#include <ctype.h> + #ifndef __header_inline + #error "<ctype.h> does not define __header_inline" + #endif + ]])], + [gl_cv_have___header_inline=yes], + [gl_cv_have___header_inline=no])]) + if test "$gl_cv_have___header_inline" = yes; then + AC_DEFINE([HAVE___HEADER_INLINE], [1], + [Define to 1 if ctype.h defines __header_inline.]) + fi + + AH_VERBATIM([HAVE___HEADER_INLINE_1], +[/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>. + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like <ctype.h>. For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see <https://trac.macports.org/ticket/41033>. + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined HAVE___HEADER_INLINE \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + && !defined __PCC__) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __PCC__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif]) +]) @@ -24,7 +24,21 @@ AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + # AC_PROG_MKDIR_P + # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix + # for interoperability with automake-1.9.6 from autoconf-2.62. + # Remove this macro when we can assume autoconf >= 2.62 or + # autoconf >= 2.60 && automake >= 1.10. + m4_ifdef([AC_PROG_MKDIR_P], [ + dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. + m4_define([AC_PROG_MKDIR_P], + m4_defn([AC_PROG_MKDIR_P])[ + AC_SUBST([MKDIR_P])])], [ + dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. + AC_DEFUN_ONCE([AC_PROG_MKDIR_P], + [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + MKDIR_P='$(mkdir_p)' + AC_SUBST([MKDIR_P])])])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that diff --git a/packaging/libidn.spec b/packaging/libidn.spec index 8d433d0..151c447 100755 --- a/packaging/libidn.spec +++ b/packaging/libidn.spec @@ -14,6 +14,7 @@ BuildRequires: pkgconfig BuildRequires: gettext-tools BuildRequires: libtool BuildRequires: autoconf +BuildRequires: gtk-doc help2man %description GNU Libidn is an implementation of the Stringprep, Punycode and @@ -36,13 +37,18 @@ developing programs which use the GNU libidn library. %prep %setup -q - %build -%configure --disable-static \ +# Prepare files required for autoreconf +touch gl/realloc.c +cp gltests/stdlib.in.h gl + +%reconfigure \ + --disable-static \ --disable-csharp \ --disable-java \ - --with-pic + --with-pic \ + --disable-gtk-doc make "%{?_smp_mflags}" |