dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59c) AC_INIT(DeviceKit-disks, 005, david@fubar.dk) AM_INIT_AUTOMAKE(DeviceKit-disks, 005) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AM_PROG_LIBTOOL AC_PROG_MAKE_SET AC_PROG_LN_S AC_SYS_LARGEFILE AM_PROG_CC_C_O m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # Taken from dbus AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no) AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) AC_ARG_ENABLE(man-pages, [ --enable-man-pages build manual pages],enable_man_pages=$enableval,enable_man_pages=yes) if test "${enable_man_page}" != no; then dnl dnl Check for xsltproc dnl AC_PATH_PROG([XSLTPROC], [xsltproc]) if test -z "$XSLTPROC"; then enable_man_pages=no fi fi AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes) GTK_DOC_CHECK([1.3]) #### gcc warning flags if test "x$GCC" = "xyes"; then changequote(,)dnl case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac case " $CFLAGS " in *[\ \ ]-Wchar-subscripts[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wchar-subscripts" ;; esac case " $CFLAGS " in *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; esac case " $CFLAGS " in *[\ \ ]-Wnested-externs[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wnested-externs" ;; esac case " $CFLAGS " in *[\ \ ]-Wpointer-arith[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wpointer-arith" ;; esac case " $CFLAGS " in *[\ \ ]-Wcast-align[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wcast-align" ;; esac case " $CFLAGS " in *[\ \ ]-Wsign-compare[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wsign-compare" ;; esac case " $CFLAGS " in *[\ \ ]-Wformat[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wformat" ;; esac case " $CFLAGS " in *[\ \ ]-Wformat-security[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wformat-security" ;; esac if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-D_POSIX_C_SOURCE*) ;; *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;; esac case " $CFLAGS " in *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;; *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; esac fi changequote([,])dnl fi have_zlib="false" AC_CHECK_LIB([z], [compress2], [have_zlib="true"]) if test x$have_zlib != "xtrue"; then AC_MSG_ERROR([zlib is needed]) fi ZLIB_CFLAGS= ZLIB_LIBS="-lz" AC_SUBST(ZLIB_CFLAGS) AC_SUBST(ZLIB_LIBS) have_sgutils="false" AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true") if test x$have_sgutils != "xtrue"; then AC_MSG_ERROR([libsgutils2 is needed]) fi SGUTILS_CFLAGS="" SGUTILS_LIBS="-lsgutils2" AC_SUBST(SGUTILS_CFLAGS) AC_SUBST(SGUTILS_LIBS) PKG_CHECK_MODULES(SQLITE3, [sqlite3]) AC_SUBST(SQLITE3_CFLAGS) AC_SUBST(SQLITE3_LIBS) PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= 001]) AC_SUBST(GUDEV_CFLAGS) AC_SUBST(GUDEV_LIBS) PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) PKG_CHECK_MODULES(GIO, [gio-unix-2.0 >= 2.15.0]) AC_SUBST(GIO_CFLAGS) AC_SUBST(GIO_LIBS) PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0]) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.74]) AC_SUBST(DBUS_GLIB_CFLAGS) AC_SUBST(DBUS_GLIB_LIBS) PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.92]) AC_SUBST(POLKIT_GOBJECT_1_CFLAGS) AC_SUBST(POLKIT_GOBJECT_1_LIBS) PKG_CHECK_MODULES(POLKIT_BACKEND_1, [polkit-backend-1 >= 0.92]) AC_SUBST(POLKIT_BACKEND_1_CFLAGS) AC_SUBST(POLKIT_BACKEND_1_LIBS) PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8]) AC_SUBST(LIBPARTED_CFLAGS) AC_SUBST(LIBPARTED_LIBS) PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) AC_SUBST(DEVMAPPER_CFLAGS) AC_SUBST(DEVMAPPER_LIBS) PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.5]) AC_SUBST(LIBATASMART_CFLAGS) AC_SUBST(LIBATASMART_LIBS) PKG_CHECK_MODULES(LIBUDEV, [libudev >= 142]) AC_SUBST(LIBUDEV_CFLAGS) AC_SUBST(LIBUDEV_LIBS) if test "x$GCC" = "xyes"; then LDFLAGS="-Wl,--as-needed $LDFLAGS" fi if test "$prefix" = "/usr" -o "$prefix" = "/usr/local" ; then slashlibdir=/lib slashsbindir=/sbin else slashlibdir=$prefix/lib slashsbindir=$prefix/sbin fi AC_SUBST(slashlibdir) AC_SUBST(slashsbindir) # ******************** # Internationalization # ******************** IT_PROG_INTLTOOL([0.36.0]) GETTEXT_PACKAGE=DeviceKit-disks AC_SUBST([GETTEXT_PACKAGE]) AM_GLIB_GNU_GETTEXT AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain]) AC_OUTPUT([ DeviceKit-disks.pc Makefile src/Makefile tools/Makefile doc/Makefile doc/version.xml doc/man/Makefile doc/dbus/Makefile policy/Makefile po/Makefile.in ]) dnl ========================================================================== echo " DeviceKit-disks $VERSION ======================= prefix: ${prefix} libdir: ${libdir} libexecdir: ${libexecdir} bindir: ${bindir} sbindir: ${sbindir} datadir: ${datadir} sysconfdir: ${sysconfdir} localstatedir: ${localstatedir} docdir: ${docdir} slashlibdir: ${slashlibdir} slashsbindir: ${slashsbindir} compiler: ${CC} cflags: ${CFLAGS} cppflags: ${CPPFLAGS} xsltproc: ${XSLTPROC} Maintainer mode: ${USE_MAINTAINER_MODE} Building api docs: ${enable_gtk_doc} Building man pages: ${enable_man_pages} "