1AC_PREREQ( 2.59 ) 2 3AC_INIT( 4 [libsmdev], 5 [20210418], 6 [joachim.metz@gmail.com]) 7 8AC_CONFIG_SRCDIR( 9 [include/libsmdev.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_MAKE_SET 25AC_PROG_INSTALL 26 27dnl Check for libtool 28AC_PROG_LIBTOOL 29AC_SUBST(LIBTOOL_DEPS) 30 31dnl Check for pkg-config 32AC_PATH_PROG(PKGCONFIG,[pkg-config]) 33 34dnl Support of internationalization (i18n) 35AM_GNU_GETTEXT([external]) 36AM_GNU_GETTEXT_VERSION([0.18.1]) 37 38dnl Check for compiler language support 39AC_C_CONST 40AC_C_VOLATILE 41 42dnl Check for large file support 43AC_SYS_LARGEFILE 44 45dnl Check if shared library support should be disabled 46AX_COMMON_CHECK_DISABLE_SHARED_LIBS 47 48dnl Check if tools should be build as static executables 49AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES 50 51dnl Check if WINAPI support should be enabled 52AX_COMMON_CHECK_ENABLE_WINAPI 53 54dnl Check if wide character type should be enabled 55AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE 56 57dnl Check if verbose output should be enabled 58AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT 59 60dnl Check if debug output should be enabled 61AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT 62 63dnl Check for type definitions 64AX_TYPES_CHECK_LOCAL 65 66dnl Check if common required headers and functions are available 67AX_COMMON_CHECK_LOCAL 68 69dnl Check if libcerror or required headers and functions are available 70AX_LIBCERROR_CHECK_ENABLE 71 72dnl Check if libcthreads or required headers and functions are available 73AX_LIBCTHREADS_CHECK_ENABLE 74 75dnl Check if libcdata or required headers and functions are available 76AX_LIBCDATA_CHECK_ENABLE 77 78dnl Check if libclocale or required headers and functions are available 79AX_LIBCLOCALE_CHECK_ENABLE 80 81dnl Check if libcnotify or required headers and functions are available 82AX_LIBCNOTIFY_CHECK_ENABLE 83 84dnl Check if libuna or required headers and functions are available 85AX_LIBUNA_CHECK_ENABLE 86 87dnl Check if libcfile or required headers and functions are available 88AX_LIBCFILE_CHECK_ENABLE 89 90dnl Check if libsmdev required headers and functions are available 91AX_LIBSMDEV_CHECK_LOCAL 92 93dnl Check if libsmdev Python bindings (pysmdev) required headers and functions are available 94AX_PYTHON_CHECK_ENABLE 95 96AS_IF( 97 [test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno], 98 [dnl Headers included in pysmdev/pysmdev_error.c 99 AC_CHECK_HEADERS([stdarg.h varargs.h]) 100 101 AS_IF( 102 [test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes], 103 [AC_MSG_FAILURE( 104 [Missing headers: stdarg.h and varargs.h], 105 [1]) 106 ]) 107 ]) 108 109dnl Check if smdevtools required headers and functions are available 110AX_SMDEVTOOLS_CHECK_LOCAL 111 112dnl Check if DLL support is needed 113AX_LIBSMDEV_CHECK_DLL_SUPPORT 114 115dnl Check if tests required headers and functions are available 116AX_TESTS_CHECK_LOCAL 117 118dnl Set additional compiler flags 119CFLAGS="$CFLAGS -Wall"; 120 121dnl Check if requires and build requires should be set in spec file 122AS_IF( 123 [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_libuna" = xyes || test "x$ac_cv_libcfile" = xyes], 124 [AC_SUBST( 125 [libsmdev_spec_requires], 126 [Requires:]) 127 ]) 128 129dnl Set the date for the dpkg files 130AC_SUBST( 131 [DPKG_DATE], 132 [`date -R 2> /dev/null`]) 133 134dnl Set the date for the spec file 135AC_SUBST( 136 [SPEC_DATE], 137 [`date +"%a %b %e %Y" 2> /dev/null`]) 138 139dnl Generate Makefiles 140AC_CONFIG_FILES([Makefile]) 141AC_CONFIG_FILES([include/Makefile]) 142AC_CONFIG_FILES([common/Makefile]) 143AC_CONFIG_FILES([libcerror/Makefile]) 144AC_CONFIG_FILES([libcthreads/Makefile]) 145AC_CONFIG_FILES([libcdata/Makefile]) 146AC_CONFIG_FILES([libclocale/Makefile]) 147AC_CONFIG_FILES([libcnotify/Makefile]) 148AC_CONFIG_FILES([libuna/Makefile]) 149AC_CONFIG_FILES([libcfile/Makefile]) 150AC_CONFIG_FILES([libsmdev/Makefile]) 151AC_CONFIG_FILES([pysmdev/Makefile]) 152AC_CONFIG_FILES([pysmdev-python2/Makefile]) 153AC_CONFIG_FILES([pysmdev-python3/Makefile]) 154AC_CONFIG_FILES([smdevtools/Makefile]) 155AC_CONFIG_FILES([po/Makefile.in]) 156AC_CONFIG_FILES([po/Makevars]) 157AC_CONFIG_FILES([manuals/Makefile]) 158AC_CONFIG_FILES([tests/Makefile]) 159AC_CONFIG_FILES([msvscpp/Makefile]) 160dnl Generate header files 161AC_CONFIG_FILES([include/libsmdev.h]) 162AC_CONFIG_FILES([include/libsmdev/definitions.h]) 163AC_CONFIG_FILES([include/libsmdev/features.h]) 164AC_CONFIG_FILES([include/libsmdev/types.h]) 165AC_CONFIG_FILES([libsmdev/libsmdev_definitions.h]) 166dnl Generate distribution specific files 167AC_CONFIG_FILES([common/types.h]) 168AC_CONFIG_FILES([dpkg/changelog]) 169AC_CONFIG_FILES([libsmdev/libsmdev.rc]) 170AC_CONFIG_FILES([libsmdev.pc]) 171AC_CONFIG_FILES([libsmdev.spec]) 172dnl Generate a source configuration file 173AC_CONFIG_HEADERS([common/config.h]) 174 175AC_OUTPUT 176 177dnl Print a summary 178AC_MSG_NOTICE([ 179Building: 180 libcerror support: $ac_cv_libcerror 181 libcthreads support: $ac_cv_libcthreads 182 libcdata support: $ac_cv_libcdata 183 libclocale support: $ac_cv_libclocale 184 libcnotify support: $ac_cv_libcnotify 185 libuna support: $ac_cv_libuna 186 libcfile support: $ac_cv_libcfile 187 188Features: 189 Multi-threading support: $ac_cv_libcthreads_multi_threading 190 Wide character type support: $ac_cv_enable_wide_character_type 191 smdevtools are build as static executables: $ac_cv_enable_static_executables 192 Python (pysmdev) support: $ac_cv_enable_python 193 Verbose output: $ac_cv_enable_verbose_output 194 Debug output: $ac_cv_enable_debug_output 195]); 196 197