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.
25 AC_PATH_PROG([M4], [m4])
27 # Checks for libraries.
29 # Checks for header files.
30 AC_CHECK_HEADERS([fcntl.h limits.h mntent.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h unistd.h])
32 # Checks for typedefs, structures, and compiler characteristics.
33 AC_CHECK_HEADER_STDBOOL
39 # Checks for library functions.
44 AC_CHECK_FUNCS([dup2 getmntent memset munmap strcasecmp strchr strdup strerror strrchr strstr])
46 # ------------------------------------------------------------------------------
60 AC_SUBST([OUR_CFLAGS], "$our_cflags")
61 AC_SUBST([OUR_LDFLAGS], "$our_ldflags")
65 # ------------------------------------------------------------------------------
66 AC_ARG_ENABLE([recovery-gui],
67 AS_HELP_STRING([--disable-recovery-gui], [disable recovery gui mode]),
68 [case "${enableval}" in
69 yes) enable_recovery_gui=yes ;;
70 no) enable_recovery_gui=no ;;
71 *) AC_MSG_ERROR(bad value ${enableval} for --disable-recovery-gui) ;;
73 enable_recovery_gui=yes)
74 if test "x$enable_recovery_gui" == "xyes"; then
75 M4_DEFINES="$M4_DEFINES -DRECOVERY_GUI"
76 AC_SUBST([OUR_CFLAGS], "$OUR_CFLAGS -DRECOVERY_GUI")
77 PKG_CHECK_MODULES(LIBPNG, [libpng])
78 PKG_CHECK_MODULES(VCONF_INTERNAL_KEYS, [vconf-internal-keys])
81 AC_SUBST([RECOVERY_GUI], ["GUI"])
82 AM_CONDITIONAL([RECOVERY_GUI], [test "x$enable_recovery_gui" != "xno"])
84 # ------------------------------------------------------------------------------
87 # ------------------------------------------------------------------------------
88 AC_CONFIG_FILES([Makefile])
92 $PACKAGE_NAME $VERSION
96 recovery gui mode: ${enable_recovery_gui}
98 OUR CFLAGS: ${OUR_CFLAGS} ${CFLAGS}