| 1 |
AC_PREREQ([2.71]) |
| 2 |
|
| 3 |
AC_INIT( |
| 4 |
[libvhdi], |
| 5 |
[20251119], |
| 6 |
[[email protected]]) |
| 7 |
|
| 8 |
AC_CONFIG_SRCDIR( |
| 9 |
[include/libvhdi.h.in]) |
| 10 |
|
| 11 |
AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar]) |
| 12 |
AM_EXTRA_RECURSIVE_TARGETS([sources splint]) |
| 13 |
|
| 14 |
AC_CONFIG_MACRO_DIR([m4]) |
| 15 |
|
| 16 |
dnl Check for host type |
| 17 |
AC_CANONICAL_HOST |
| 18 |
|
| 19 |
dnl Check for libtool DLL support |
| 20 |
LT_INIT([win32-dll]) |
| 21 |
|
| 22 |
dnl Checks for programs |
| 23 |
AC_PROG_CC |
| 24 |
AC_PROG_GCC_TRADITIONAL |
| 25 |
AC_PROG_CXX |
| 26 |
AC_PROG_MAKE_SET |
| 27 |
AC_PROG_INSTALL |
| 28 |
|
| 29 |
dnl Check for libtool |
| 30 |
AC_SUBST(LIBTOOL_DEPS) |
| 31 |
|
| 32 |
dnl Check for pkg-config |
| •33 |
AC_PATH_TOOL(PKGCONFIG,[pkg-config]) |
| 34 |
|
| 35 |
dnl Support of internationalization (i18n) |
| 36 |
AM_GNU_GETTEXT([external]) |
| 37 |
AM_GNU_GETTEXT_VERSION([0.21]) |
| 38 |
|
| 39 |
dnl Check for compiler language support |
| 40 |
AC_C_CONST |
| 41 |
AC_C_VOLATILE |
| 42 |
|
| 43 |
dnl Check for large file support |
| 44 |
AC_SYS_LARGEFILE |
| 45 |
|
| 46 |
dnl Check if shared library support should be disabled |
| 47 |
AX_COMMON_CHECK_DISABLE_SHARED_LIBS |
| 48 |
|
| 49 |
dnl Check if tools should be build as static executables |
| 50 |
AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES |
| 51 |
|
| 52 |
dnl Check if WINAPI support should be enabled |
| 53 |
AX_COMMON_CHECK_ENABLE_WINAPI |
| 54 |
|
| 55 |
dnl Check if wide character type should be enabled |
| 56 |
AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE |
| 57 |
|
| 58 |
dnl Check if verbose output should be enabled |
| 59 |
AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT |
| 60 |
|
| 61 |
dnl Check if debug output should be enabled |
| 62 |
AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT |
| 63 |
|
| 64 |
dnl Check for type definitions |
| 65 |
AX_TYPES_CHECK_LOCAL |
| 66 |
|
| 67 |
dnl Check if common required headers and functions are available |
| 68 |
AX_COMMON_CHECK_LOCAL |
| 69 |
|
| 70 |
dnl Check if libcerror or required headers and functions are available |
| 71 |
AX_LIBCERROR_CHECK_ENABLE |
| 72 |
|
| 73 |
dnl Check if libcthreads or required headers and functions are available |
| 74 |
AX_LIBCTHREADS_CHECK_ENABLE |
| 75 |
|
| 76 |
dnl Check if libcdata or required headers and functions are available |
| 77 |
AX_LIBCDATA_CHECK_ENABLE |
| 78 |
|
| 79 |
dnl Check if libclocale or required headers and functions are available |
| 80 |
AX_LIBCLOCALE_CHECK_ENABLE |
| 81 |
|
| 82 |
dnl Check if libcnotify or required headers and functions are available |
| 83 |
AX_LIBCNOTIFY_CHECK_ENABLE |
| 84 |
|
| 85 |
dnl Check if libcsplit or required headers and functions are available |
| 86 |
AX_LIBCSPLIT_CHECK_ENABLE |
| 87 |
|
| 88 |
dnl Check if libuna or required headers and functions are available |
| 89 |
AX_LIBUNA_CHECK_ENABLE |
| 90 |
|
| 91 |
dnl Check if libcfile or required headers and functions are available |
| 92 |
AX_LIBCFILE_CHECK_ENABLE |
| 93 |
|
| 94 |
dnl Check if libcpath or required headers and functions are available |
| 95 |
AX_LIBCPATH_CHECK_ENABLE |
| 96 |
|
| 97 |
dnl Check if libbfio or required headers and functions are available |
| 98 |
AX_LIBBFIO_CHECK_ENABLE |
| 99 |
|
| 100 |
dnl Check if libfcache or required headers and functions are available |
| 101 |
AX_LIBFCACHE_CHECK_ENABLE |
| 102 |
|
| 103 |
dnl Check if libfdata or required headers and functions are available |
| 104 |
AX_LIBFDATA_CHECK_ENABLE |
| 105 |
|
| 106 |
dnl Check if libfguid or required headers and functions are available |
| 107 |
AX_LIBFGUID_CHECK_ENABLE |
| 108 |
|
| 109 |
dnl Check if libvhdi required headers and functions are available |
| 110 |
AX_LIBVHDI_CHECK_LOCAL |
| 111 |
|
| 112 |
dnl Check if libvhdi Python bindings (pyvhdi) required headers and functions are available |
| 113 |
AX_PYTHON_CHECK_ENABLE |
| 114 |
|
| 115 |
AS_IF( |
| 116 |
[test "x${ac_cv_enable_python}" != xno], |
| 117 |
[dnl Headers included in pyvhdi/pyvhdi_error.c |
| 118 |
AC_CHECK_HEADERS([stdarg.h varargs.h]) |
| 119 |
|
| 120 |
AS_IF( |
| 121 |
[test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes], |
| 122 |
[AC_MSG_FAILURE( |
| 123 |
[Missing headers: stdarg.h and varargs.h], |
| 124 |
[1]) |
| 125 |
]) |
| 126 |
]) |
| 127 |
|
| 128 |
dnl Check if libfuse or required headers and functions are available |
| 129 |
AX_LIBFUSE_CHECK_ENABLE |
| 130 |
|
| 131 |
dnl Check if vhditools required headers and functions are available |
| 132 |
AX_VHDITOOLS_CHECK_LOCAL |
| 133 |
|
| 134 |
dnl Check if DLL support is needed |
| 135 |
AX_LIBVHDI_CHECK_DLL_SUPPORT |
| 136 |
|
| 137 |
dnl Check if tests required headers and functions are available |
| 138 |
AX_TESTS_CHECK_LOCAL |
| 139 |
AX_TESTS_CHECK_OSSFUZZ |
| 140 |
|
| 141 |
dnl Set additional compiler flags |
| 142 |
CFLAGS="$CFLAGS -Wall"; |
| 143 |
|
| 144 |
dnl Check if requires and build requires should be set in spec file |
| 145 |
AS_IF( |
| 146 |
[test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfguid" = xyes], |
| 147 |
[AC_SUBST( |
| 148 |
[libvhdi_spec_requires], |
| 149 |
[Requires:]) |
| 150 |
]) |
| 151 |
|
| 152 |
AS_IF( |
| 153 |
[test "x$ac_cv_libfuse" != xno], |
| 154 |
[AC_SUBST( |
| 155 |
[libvhdi_spec_tools_build_requires], |
| 156 |
[BuildRequires:]) |
| 157 |
]) |
| 158 |
|
| 159 |
dnl Set the date for the dpkg files |
| 160 |
AC_SUBST( |
| 161 |
[DPKG_DATE], |
| 162 |
[`date -R 2> /dev/null`]) |
| 163 |
|
| 164 |
dnl Set the date for the spec file |
| 165 |
AC_SUBST( |
| 166 |
[SPEC_DATE], |
| 167 |
[`date +"%a %b %e %Y" 2> /dev/null`]) |
| 168 |
|
| 169 |
dnl Generate Makefiles |
| 170 |
AC_CONFIG_FILES([Makefile]) |
| 171 |
AC_CONFIG_FILES([include/Makefile]) |
| 172 |
AC_CONFIG_FILES([common/Makefile]) |
| 173 |
AC_CONFIG_FILES([libcerror/Makefile]) |
| 174 |
AC_CONFIG_FILES([libcthreads/Makefile]) |
| 175 |
AC_CONFIG_FILES([libcdata/Makefile]) |
| 176 |
AC_CONFIG_FILES([libclocale/Makefile]) |
| 177 |
AC_CONFIG_FILES([libcnotify/Makefile]) |
| 178 |
AC_CONFIG_FILES([libcsplit/Makefile]) |
| 179 |
AC_CONFIG_FILES([libuna/Makefile]) |
| 180 |
AC_CONFIG_FILES([libcfile/Makefile]) |
| 181 |
AC_CONFIG_FILES([libcpath/Makefile]) |
| 182 |
AC_CONFIG_FILES([libbfio/Makefile]) |
| 183 |
AC_CONFIG_FILES([libfcache/Makefile]) |
| 184 |
AC_CONFIG_FILES([libfdata/Makefile]) |
| 185 |
AC_CONFIG_FILES([libfguid/Makefile]) |
| 186 |
AC_CONFIG_FILES([libvhdi/Makefile]) |
| 187 |
AC_CONFIG_FILES([pyvhdi/Makefile]) |
| 188 |
AC_CONFIG_FILES([vhditools/Makefile]) |
| 189 |
AC_CONFIG_FILES([po/Makefile.in]) |
| 190 |
AC_CONFIG_FILES([po/Makevars]) |
| 191 |
AC_CONFIG_FILES([manuals/Makefile]) |
| 192 |
AC_CONFIG_FILES([tests/Makefile]) |
| 193 |
AC_CONFIG_FILES([ossfuzz/Makefile]) |
| 194 |
AC_CONFIG_FILES([msvscpp/Makefile]) |
| 195 |
dnl Generate header files |
| 196 |
AC_CONFIG_FILES([include/libvhdi.h]) |
| 197 |
AC_CONFIG_FILES([include/libvhdi/definitions.h]) |
| 198 |
AC_CONFIG_FILES([include/libvhdi/features.h]) |
| 199 |
AC_CONFIG_FILES([include/libvhdi/types.h]) |
| 200 |
AC_CONFIG_FILES([libvhdi/libvhdi_definitions.h]) |
| 201 |
dnl Generate distribution specific files |
| 202 |
AC_CONFIG_FILES([common/types.h]) |
| 203 |
AC_CONFIG_FILES([dpkg/changelog]) |
| 204 |
AC_CONFIG_FILES([libvhdi/libvhdi.rc]) |
| 205 |
AC_CONFIG_FILES([libvhdi.pc]) |
| 206 |
AC_CONFIG_FILES([libvhdi.spec]) |
| 207 |
AC_CONFIG_FILES([setup.cfg]) |
| 208 |
dnl Generate a source configuration file |
| 209 |
AC_CONFIG_HEADERS([common/config.h]) |
| 210 |
|
| 211 |
AC_OUTPUT |
| 212 |
|
| 213 |
dnl Print a summary |
| 214 |
AC_MSG_NOTICE([ |
| 215 |
Building: |
| 216 |
libcerror support: $ac_cv_libcerror |
| 217 |
libcthreads support: $ac_cv_libcthreads |
| 218 |
libcdata support: $ac_cv_libcdata |
| 219 |
libclocale support: $ac_cv_libclocale |
| 220 |
libcnotify support: $ac_cv_libcnotify |
| 221 |
libcsplit support: $ac_cv_libcsplit |
| 222 |
libuna support: $ac_cv_libuna |
| 223 |
libcfile support: $ac_cv_libcfile |
| 224 |
libcpath support: $ac_cv_libcpath |
| 225 |
libbfio support: $ac_cv_libbfio |
| 226 |
libfcache support: $ac_cv_libfcache |
| 227 |
libfdata support: $ac_cv_libfdata |
| 228 |
libfguid support: $ac_cv_libfguid |
| 229 |
FUSE support: $ac_cv_libfuse |
| 230 |
|
| 231 |
Features: |
| 232 |
Multi-threading support: $ac_cv_libcthreads_multi_threading |
| 233 |
Wide character type support: $ac_cv_enable_wide_character_type |
| 234 |
vhditools are build as static executables: $ac_cv_enable_static_executables |
| 235 |
Python (pyvhdi) support: $ac_cv_enable_python |
| 236 |
Verbose output: $ac_cv_enable_verbose_output |
| 237 |
Debug output: $ac_cv_enable_debug_output |
| 238 |
]); |
| 239 |
|