2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([initrd-recovery], [2.1.1], [walyong.cho@samsung.com])
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADERS([config.h])
10 AC_USE_SYSTEM_EXTENSIONS
12 AC_PREFIX_DEFAULT([/usr])
13 AM_INIT_AUTOMAKE([foreign subdir-objects])
16 LT_INIT([disable-static])
18 # Checks for programs.
24 AC_PATH_PROG([M4], [m4])
26 # Checks for libraries.
28 # Checks for header files.
29 AC_CHECK_HEADERS([fcntl.h limits.h mntent.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h unistd.h])
31 # Checks for typedefs, structures, and compiler characteristics.
32 AC_CHECK_HEADER_STDBOOL
38 # Checks for library functions.
43 AC_CHECK_FUNCS([dup2 getmntent memset munmap strcasecmp strchr strdup strerror strrchr strstr])
45 # ------------------------------------------------------------------------------
59 AC_SUBST([OUR_CFLAGS], "$our_cflags")
60 AC_SUBST([OUR_LDFLAGS], "$our_ldflags")
64 # ------------------------------------------------------------------------------
65 AC_ARG_ENABLE([recovery-gui],
66 AS_HELP_STRING([--disable-recovery-gui], [disable recovery gui mode]),
67 [case "${enableval}" in
68 yes) enable_recovery_gui=yes ;;
69 no) enable_recovery_gui=no ;;
70 *) AC_MSG_ERROR(bad value ${enableval} for --disable-recovery-gui) ;;
72 enable_recovery_gui=yes)
73 if test "x$enable_recovery_gui" == "xyes"; then
74 M4_DEFINES="$M4_DEFINES -DRECOVERY_GUI"
75 AC_SUBST([OUR_CFLAGS], "$OUR_CFLAGS -DRECOVERY_GUI")
76 PKG_CHECK_MODULES(LIBPNG, [libpng])
77 PKG_CHECK_MODULES(VCONF_INTERNAL_KEYS, [vconf-internal-keys])
83 AC_SUBST([RECOVERY_GUI])
84 AM_CONDITIONAL([RECOVERY_GUI], [test "x$enable_recovery_gui" != "xno"])
86 # ------------------------------------------------------------------------------
89 # ------------------------------------------------------------------------------
90 AC_CONFIG_FILES([Makefile])
94 $PACKAGE_NAME $VERSION
98 recovery gui mode: ${enable_recovery_gui}
100 OUR CFLAGS: ${OUR_CFLAGS} ${CFLAGS}