2 ## Process this file with autoconf to produce a configure script.
3 ## Use autoupdate to update this file for newer versions of autoconf.
4 ## Use autoscan to check if you need to add something to this file.
8 dnl Define different version variables.
11 dnl FRIBIDI_MICRO_VERSION++;
12 dnl FRIBIDI_INTERFACE_AGE++;
14 dnl If any functions have been added:
15 dnl FRIBIDI_INTERFACE_AGE = 0;
16 dnl FRIBIDI_INTERFACE_VERSION++;
17 dnl FRIBIDI_BINARY_AGE++;
19 dnl If binary backwards compatibility has been broken:
20 dnl FRIBIDI_BINARY_AGE = FRIBIDI_INTERFACE_AGE = 0;
22 m4_define(fribidi_major_version, 1)dnl
23 m4_define(fribidi_minor_version, 0)dnl
24 m4_define(fribidi_micro_version, 5)dnl
25 m4_define(fribidi_interface_version, 4)dnl
26 m4_define(fribidi_interface_age, 0)dnl
27 m4_define(fribidi_binary_age, 4)dnl
29 m4_define(fribidi_version,fribidi_major_version.fribidi_minor_version.fribidi_micro_version)dnl
31 AC_INIT([GNU FriBidi],
33 [https://github.com/fribidi/fribidi/issues/new],
35 [http://fribidi.org/])
37 AC_CONFIG_SRCDIR([fribidi.pc.in])
38 AC_CONFIG_HEADERS([config.h])
39 AC_CONFIG_MACRO_DIR([m4])
41 AM_INIT_AUTOMAKE([1.11.1 gnits dist-bzip2 no-dist-gzip -Wall no-define])
42 AM_SILENT_RULES([yes])
48 LT_INIT([disable-static])
50 FRIBIDI_MAJOR_VERSION=fribidi_major_version()
51 FRIBIDI_MINOR_VERSION=fribidi_minor_version()
52 FRIBIDI_MICRO_VERSION=fribidi_micro_version()
53 FRIBIDI_VERSION=fribidi_version()
54 FRIBIDI_INTERFACE_VERSION=fribidi_interface_version()
55 FRIBIDI_INTERFACE_AGE=fribidi_interface_age()
56 FRIBIDI_BINARY_AGE=fribidi_binary_age()
58 AC_SUBST(FRIBIDI_MAJOR_VERSION)
59 AC_SUBST(FRIBIDI_MINOR_VERSION)
60 AC_SUBST(FRIBIDI_MICRO_VERSION)
61 AC_SUBST(FRIBIDI_VERSION)
62 AC_SUBST(FRIBIDI_INTERFACE_VERSION)
63 AC_SUBST(FRIBIDI_INTERFACE_AGE)
64 AC_SUBST(FRIBIDI_BINARY_AGE)
66 FRIBIDI_MSVC_BUILD_PLACEHOLDER="#undef FRIBIDI_BUILT_WITH_MSVC"
67 AC_SUBST(FRIBIDI_MSVC_BUILD_PLACEHOLDER)
69 dnl libtool versioning.
70 m4_define(lt_current, fribidi_interface_version())dnl
71 m4_define(lt_revision, fribidi_interface_age())dnl
72 m4_define(lt_age, fribidi_binary_age())dnl
73 LT_VERSION_INFO=lt_current():lt_revision():lt_age()
74 LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
76 AC_SUBST(LT_VERSION_INFO)
77 AC_SUBST(LT_CURRENT_MINUS_AGE)
79 dnl ==========================================================================
81 # Checks for programs.
85 AC_MSG_CHECKING([for native Win32])
87 mingw*) os_win32=yes ;;
90 AC_MSG_RESULT([$os_win32])
91 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
92 AC_MSG_CHECKING([for some Win32 platform])
94 mingw*|cygwin*) platform_win32=yes ;;
95 *) platform_win32=no ;;
97 AC_MSG_RESULT([$platform_win32])
98 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
101 # Checks for header files.
103 AC_CHECK_HEADERS([stdlib.h string.h strings.h wchar.h asm/page.h sys/times.h])
105 # Checks for typedefs and structures.
109 SIZEOF_INT=$ac_cv_sizeof_int
111 AC_CHECK_SIZEOF(short)
112 AC_CHECK_SIZEOF(void *)
113 AC_CHECK_SIZEOF(wchar_t)
116 # Checks for compiler characteristics.
118 if test "x$GCC" = "xyes"; then
119 CFLAGS="$CFLAGS -Wall -ansi "
123 # Checks for library functions.
124 AC_CHECK_FUNCS([memmove memset strdup])
127 # Checks for configure options
130 m4_define(debug_default,
131 m4_if(m4_eval(fribidi_minor_version() % 2),1,yes,no))
133 AC_HELP_STRING([--enable-debug],
134 [turn on debugging @<:@default=debug_default()@:>@]),,
135 enable_debug=debug_default())
136 if test x$enable_debug = xyes; then
138 [Define to 1 if you want to include debug code in the library])
141 # --disable-deprecated
142 AC_ARG_ENABLE(deprecated,
143 AC_HELP_STRING([--disable-deprecated],
144 [do not build deprecated functionality]))
145 if test x$enable_deprecated = xno; then
146 AC_DEFINE(FRIBIDI_NO_DEPRECATED, 1,
147 [Don not build deprecated functionality])
151 AC_CONFIG_FILES([fribidi.pc
159 test/unicode-conformance/Makefile])