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