-------- Original Message --------
Subject: Re: [lfs-dev] LFS SVN and Systemd Report
From: Bruce Dubbs <bruce.du...@gmail.com>
Date: Thu, May 31, 2012 4:51 pm
To: LFS Developers Mailinglist <lfs-dev@linuxfromscratch.org>

Andrew Benton wrote:
> On Thu, 31 May 2012 16:58:00 +0100
> Bruce Dubbs <bruce.du...@gmail.com> wrote:
> 
>> Try this diff for configure.ac.
> 
> It helps. I can get through configure Ok, but I can't see a way to get
> through make without dbus.

Did you try in a Chapter 6 environment? I can't get it to work without 
pkg-config.

You can try the same environment. Get lfs-SVN-20120524.tar.xz from 
http://www.linuxfromscratch.org/~bdubbs/systemd-udev/ and extract to an 
empty partition. Mount that partition as /mnt/lfs and chroot into it as 
in Chapter 6.

 -- Bruce
First why hasn't the first two times shown up on LFS-Dev?  I've been
subscribed since
before 2004.

Anyway ...

I've created a patch to systemd-183/{Makefile.am,configure.ac}.

No dbus, pam, tcp-wrappers.  Only kmod and blkid needed.

It strips out everything but libudev, udevadmin, and udevd ( now called
that again), rules, helpers, and tests.

libudev is in ${prefix}/lib
udevadmin is in ${prefix}/bin
udevd is in ${rootprefix}/sbin
rules are in $(libexecdir)/udev/rules.d
helpers are in $(libexecdir)/udev

The persistent rules generators are still an issue.

I'm on system with an old libblkid so I can't test the run, but I'm only
getting the errors that I expect. 

The patch looks a little funny because of the amount that stripped out
on Makefile.am. 

It also will generate a package call udev-simple-183.

If LFS were to create it's own version of udev then this might be the
solution.  No sources were touched or moved from the original systemd
location, so syncing back will be trivial.  Makefile.am and configure.ac
shouldn't change that often or very much.

There maybe some more files that could be removed from the convience lib
libsystemd_shared, but that requires a lot more work in chasing through
the code.

I'm just attachong the Makefil.am and configure.ac.  Their smaller than
the patch and the context in diff is crap.


#  -*- Mode: makefile; indent-tabs-mode: t -*- */
#
#  This file is part of systemd.
#
#  Copyright 2010-2012 Lennart Poettering
#  Copyright 2010-2012 Kay Sievers
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
#  systemd is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public License
#  along with systemd; If not, see <http://www.gnu.org/licenses/>.

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory

LIBUDEV_CURRENT=1
LIBUDEV_REVISION=0
LIBUDEV_AGE=0

# Dirs of external packages
pkgconfigdatadir=$(datadir)/pkgconfig
pkgconfiglibdir=$(libdir)/pkgconfig

# Our own, non-special dirs
udevlibexecdir=$(libexecdir)/udev
udevrulesdir = $(libexecdir)/udev/rules.d

# And these are the special ones for /
rootprefix=@rootprefix@
rootbindir=$(rootprefix)/bin
rootlibexecdir=$(rootprefix)/sbin

CLEANFILES =
EXTRA_DIST =
INSTALL_DATA_HOOKS =
DISTCLEAN_LOCAL_HOOKS =
noinst_LTLIBRARIES =
lib_LTLIBRARIES =
include_HEADERS =
pkgconfiglib_DATA =
dist_udevrules_DATA =
check_DATA =
noinst_PROGRAMS =
TESTS =
udevlibexec_PROGRAMS =

AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
        -DSYSCONFDIR=\""$(sysconfdir)"\" \
        -DUDEVLIBEXECDIR=\""$(libexecdir)/udev"\" \
        -I $(top_srcdir)/src \
        -I $(top_srcdir)/src/shared \
        -I $(top_srcdir)/src/systemd \
        -I $(top_srcdir)/src/libudev \
        -I $(top_srcdir)/src/udev

AM_CFLAGS = $(WARNINGFLAGS)
AM_LDFLAGS = $(GCLDFLAGS)

# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
        libsystemd-shared.la

libsystemd_shared_la_SOURCES = \
        src/shared/linux/auto_dev-ioctl.h \
        src/shared/linux/fanotify.h \
        src/shared/missing.h \
        src/shared/list.h \
        src/shared/macro.h \
        src/shared/def.h \
        src/shared/util.c \
        src/shared/util.h \
        src/shared/virt.c \
        src/shared/virt.h \
        src/shared/path-util.c \
        src/shared/path-util.h \
        src/shared/hashmap.c \
        src/shared/hashmap.h \
        src/shared/set.c \
        src/shared/set.h \
        src/shared/strv.c \
        src/shared/strv.h \
        src/shared/conf-parser.c \
        src/shared/conf-parser.h \
        src/shared/log.c \
        src/shared/log.h \
        src/shared/ratelimit.h \
        src/shared/ratelimit.c \
        src/shared/exit-status.c \
        src/shared/exit-status.h \
        src/shared/utf8.c \
        src/shared/utf8.h \
        src/shared/pager.c \
        src/shared/pager.h \
        src/shared/ioprio.h \
        src/shared/socket-util.c \
        src/shared/socket-util.h \
        src/shared/conf-files.c \
        src/shared/conf-files.h \
        src/shared/cgroup-util.c \
        src/shared/cgroup-util.h \
        src/shared/cgroup-show.c \
        src/shared/cgroup-show.h \
        src/shared/unit-name.c \
        src/shared/unit-name.h \
        src/shared/utmp-wtmp.c \
        src/shared/utmp-wtmp.h \
        src/shared/watchdog.c \
        src/shared/watchdog.h \
        src/shared/specifier.c \
        src/shared/specifier.h \
        src/shared/hwclock.c \
        src/shared/hwclock.h

# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
        libsystemd-label.la

libsystemd_label_la_SOURCES = \
        src/shared/cgroup-label.c \
        src/shared/socket-label.c \
        src/shared/label.c \
        src/shared/label.h \
        src/shared/mkdir.c \
        src/shared/mkdir.h \
        src/shared/ask-password-api.c \
        src/shared/ask-password-api.h \
        src/shared/dev-setup.c \
        src/shared/dev-setup.h

libsystemd_label_la_CFLAGS = \
        $(AM_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(SELINUX_CFLAGS)

libsystemd_label_la_LIBADD = \
        $(SELINUX_LIBS)

# ------------------------------------------------------------------------------
include_HEADERS += \
        src/libudev/libudev.h

lib_LTLIBRARIES += \
        libudev.la

libudev_la_SOURCES =\
        src/libudev/libudev-private.h \
        src/libudev/libudev.c \
        src/libudev/libudev-list.c \
        src/libudev/libudev-util.c \
        src/libudev/libudev-device.c \
        src/libudev/libudev-enumerate.c \
        src/libudev/libudev-monitor.c \
        src/libudev/libudev-queue.c

libudev_la_CFLAGS = \
        $(AM_CFLAGS) \
        -fvisibility=hidden

libudev_la_LDFLAGS = \
        $(AM_LDFLAGS) \
        -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym

libudev_la_LIBADD = \
        libsystemd-shared.la

pkgconfiglib_DATA += \
        src/libudev/libudev.pc

EXTRA_DIST += \
        src/libudev/libudev.pc.in \
        src/libudev/libudev.sym

CLEANFILES += \
        src/libudev/libudev.pc

# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
        libudev-private.la

libudev_private_la_SOURCES =\
        $(libudev_la_SOURCES) \
        src/libudev/libudev-device-private.c \
        src/libudev/libudev-queue-private.c

libudev_private_la_CFLAGS = \
        $(AM_CFLAGS) \
        -fvisibility=default

libudev_private_la_LIBADD = \
        libsystemd-shared.la

# ------------------------------------------------------------------------------
MANPAGES = \
        man/udev.7 \
        man/udevadm.8 \
        man/systemd-udevd.8

udev-confdirs:
        -mkdir -p $(DESTDIR)$(sysconfdir)/udev/rules.d
        -mkdir -p $(DESTDIR)$(libexecdir)/udev/devices

INSTALL_DATA_HOOKS += udev-confdirs

dist_udevrules_DATA += \
        rules/42-usb-hid-pm.rules \
        rules/50-udev-default.rules \
        rules/60-persistent-storage-tape.rules \
        rules/60-persistent-serial.rules \
        rules/60-persistent-input.rules \
        rules/60-persistent-alsa.rules \
        rules/60-persistent-storage.rules \
        rules/75-net-description.rules \
        rules/75-tty-description.rules \
        rules/78-sound-card.rules \
        rules/80-drivers.rules \
        rules/95-udev-late.rules

udevconfdir = $(sysconfdir)/udev
dist_udevconf_DATA = \
        src/udev/udev.conf

sharepkgconfigdir = $(datadir)/pkgconfig
sharepkgconfig_DATA = \
        src/udev/udev.pc

EXTRA_DIST += \
        src/udev/udev.pc.in

CLEANFILES += \
        src/udev/udev.pc

bin_PROGRAMS = \
        udevadm

rootlibexec_PROGRAMS = \
        udevd

noinst_LTLIBRARIES += \
        libudev-core.la

libudev_core_la_SOURCES = \
        src/udev/udev.h \
        src/udev/udev-event.c \
        src/udev/udev-watch.c \
        src/udev/udev-node.c \
        src/udev/udev-rules.c \
        src/udev/udev-ctrl.c \
        src/udev/udev-builtin.c \
        src/udev/udev-builtin-blkid.c \
        src/udev/udev-builtin-firmware.c \
        src/udev/udev-builtin-hwdb.c \
        src/udev/udev-builtin-input_id.c \
        src/udev/udev-builtin-kmod.c \
        src/udev/udev-builtin-path_id.c \
        src/udev/udev-builtin-usb_id.c \
        src/systemd/sd-daemon.h \
        src/libsystemd-daemon/sd-daemon.c

libudev_core_la_CFLAGS = \
        $(AM_CFLAGS) \
        $(BLKID_CFLAGS) \
        $(KMOD_CFLAGS)

libudev_core_la_LIBADD = \
        libudev-private.la \
        libsystemd-label.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)

libudev_core_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DFIRMWARE_PATH="$(FIRMWARE_PATH)" \
        -DUSB_DATABASE=\"$(USB_DATABASE)\" -DPCI_DATABASE=\"$(PCI_DATABASE)\"

if HAVE_ACL
libudev_core_la_SOURCES += \
        src/udev/udev-builtin-uaccess.c \
        src/login/logind-acl.c \
        src/login/sd-login.c

libudev_core_la_LIBADD += \
        libsystemd-acl.la
endif

udevd_SOURCES = \
        src/udev/udevd.c

udevd_LDADD = \
        libudev-core.la

udevadm_SOURCES = \
        src/udev/udevadm.c \
        src/udev/udevadm-info.c \
        src/udev/udevadm-control.c \
        src/udev/udevadm-monitor.c \
        src/udev/udevadm-settle.c \
        src/udev/udevadm-trigger.c \
        src/udev/udevadm-test.c \
        src/udev/udevadm-test-builtin.c

udevadm_LDADD = \
        libudev-core.la \
        libsystemd-shared.la

# ------------------------------------------------------------------------------
TESTS += \
        test/udev-test.pl \
        test/rules-test.sh

noinst_PROGRAMS += \
        test-libudev \
        test-udev

test_libudev_SOURCES = \
        src/test/test-libudev.c

test_libudev_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la \
        libudev.la

test_udev_SOURCES = \
        src/test/test-udev.c \
        $(libudev_core_la_SOURCES) \
        $(libudev_private_la_SOURCES)

# The test-udev program needs everything compiled with relative path
# names for /sys, /dev, /run prefixed, pointing to our test/ directory.
test_udev_CFLAGS = \
        -DTEST_PREFIX=\"test\" \
        $(libudev_core_la_CFLAGS) \
        $(libudev_private_la_CFLAGS)

test_udev_CPPFLAGS =\
        $(libudev_core_la_CPPFLAGS)

test_udev_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS) \
        $(SELINUX_LIBS)

if HAVE_ACL
test_udev_LDADD += \
        libsystemd-acl.la
endif

check_DATA += \
        test/sys

# packed sysfs test tree
test/sys:
        $(AM_V_GEN)mkdir -p test && tar -C test/ -xJf 
$(top_srcdir)/test/sys.tar.xz

test-sys-distclean:
        -rm -rf test/sys
DISTCLEAN_LOCAL_HOOKS += test-sys-distclean

EXTRA_DIST += \
        test/sys.tar.xz \
        test/udev-test.pl \
        test/rules-test.sh \
        test/rule-syntax-check.py

# ------------------------------------------------------------------------------
ata_id_SOURCES = \
        src/udev/ata_id/ata_id.c

ata_id_LDADD = \
        libudev-private.la \
        libsystemd-shared.la

udevlibexec_PROGRAMS += \
        ata_id

# ------------------------------------------------------------------------------
cdrom_id_SOURCES = \
        src/udev/cdrom_id/cdrom_id.c

cdrom_id_LDADD = \
        libudev.la \
        libsystemd-shared.la

udevlibexec_PROGRAMS += \
        cdrom_id

dist_udevrules_DATA += \
        rules/60-cdrom_id.rules

# ------------------------------------------------------------------------------
collect_SOURCES = \
        src/udev/collect/collect.c

collect_LDADD = \
        libudev-private.la

udevlibexec_PROGRAMS += \
        collect

# ------------------------------------------------------------------------------
scsi_id_SOURCES =\
        src/udev/scsi_id/scsi_id.c \
        src/udev/scsi_id/scsi_serial.c \
        src/udev/scsi_id/scsi.h \
        src/udev/scsi_id/scsi_id.h

scsi_id_LDADD = \
        libudev-private.la \
        libsystemd-shared.la

udevlibexec_PROGRAMS += \
        scsi_id

EXTRA_DIST += \
        src/udev/scsi_id/README

# ------------------------------------------------------------------------------
v4l_id_SOURCES = \
        src/udev/v4l_id/v4l_id.c

v4l_id_LDADD = \
        libudev.la

udevlibexec_PROGRAMS += \
        v4l_id

dist_udevrules_DATA += \
        rules/60-persistent-v4l.rules

# ------------------------------------------------------------------------------
accelerometer_SOURCES = \
        src/udev/accelerometer/accelerometer.c

accelerometer_LDADD = \
        libudev.la -lm \
        libsystemd-shared.la

udevlibexec_PROGRAMS += \
        accelerometer

dist_udevrules_DATA += \
        rules/61-accelerometer.rules

# ------------------------------------------------------------------------------
mtd_probe_SOURCES =  \
        src/udev/mtd_probe/mtd_probe.c \
        src/udev/mtd_probe/mtd_probe.h \
        src/udev/mtd_probe/probe_smartmedia.c

mtd_probe_CPPFLAGS = \
        $(AM_CPPFLAGS)

dist_udevrules_DATA += \
        rules/75-probe_mtd.rules

udevlibexec_PROGRAMS += \
        mtd_probe

# ------------------------------------------------------------------------------

SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(SED)  \
                -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
                -e 's,@prefix\@,$(prefix),g' \
                -e 's,@exec_prefix\@,$(exec_prefix),g' \
                -e 's,@libdir\@,$(libdir),g' \
                -e 's,@includedir\@,$(includedir),g' \
                -e 's,@VERSION\@,$(VERSION),g' \
                < $< > $@ || rm $@

%.pc: %.pc.in Makefile
        $(SED_PROCESS)

DISTCHECK_CONFIGURE_FLAGS = \
        --with-rootprefix=$$dc_install_base 

#  This file is part of systemd.
#
#  Copyright 2010-2012 Lennart Poettering
#  Copyright 2010-2012 Kay Sievers
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
#  systemd is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public License
#  along with systemd; If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ([2.64])

AC_INIT([udev],
        [183],
        [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
        [udev-simple],
        [http://www.freedesktop.org/wiki/Software/systemd])

AC_CONFIG_SRCDIR([src/libudev/libudev.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])

AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax 
no-dist-gzip dist-xz subdir-objects check-news])
AM_SILENT_RULES([yes])
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
       test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
      [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])

LT_PREREQ(2.2)
LT_INIT

AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_GREP
AC_PROG_AWK

AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL

AC_PATH_PROG([M4], [m4])

AC_CHECK_TOOL(OBJCOPY, objcopy)
AC_CHECK_TOOL(STRINGS, strings)
AC_CHECK_TOOL(GPERF, gperf)
if test -z "$GPERF" ; then
        AC_MSG_ERROR([*** gperf not found])
fi

CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
        -pipe \
        -Wall \
        -W \
        -Wextra \
        -Wno-inline \
        -Wvla \
        -Wundef \
        -Wformat=2 \
        -Wlogical-op \
        -Wsign-compare \
        -Wformat-security \
        -Wmissing-include-dirs \
        -Wformat-nonliteral \
        -Wold-style-definition \
        -Wpointer-arith \
        -Winit-self \
        -Wdeclaration-after-statement \
        -Wfloat-equal \
        -Wmissing-prototypes \
        -Wstrict-prototypes \
        -Wredundant-decls \
        -Wmissing-declarations \
        -Wmissing-noreturn \
        -Wshadow \
        -Wendif-labels \
        -Wcast-align \
        -Wstrict-aliasing=2 \
        -Wwrite-strings \
        -Wno-long-long \
        -Wno-overlength-strings \
        -Wno-unused-parameter \
        -Wno-missing-field-initializers \
        -Wno-unused-result \
        -Werror=overflow \
        -Wp,-D_FORTIFY_SOURCE=2 \
        -ffast-math \
        -fno-common \
        -fdiagnostics-show-option \
        -fno-strict-aliasing \
        -fvisibility=hidden \
        -ffunction-sections \
        -fdata-sections])
AC_SUBST([WARNINGFLAGS], $with_cflags)

CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
        -Wl,--as-needed \
        -Wl,--gc-sections])
AC_SUBST([GCLDFLAGS], $with_ldflags)

AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library 
not found])])
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader 
library not found])])

# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install 
pkg-config])

PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])

# ------------------------------------------------------------------------------
have_selinux=no
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional 
SELINUX support]))
if test "x$enable_selinux" != "xno"; then
        PKG_CHECK_MODULES(SELINUX, [ libselinux ],
                [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) 
have_selinux=yes], have_selinux=no)
        if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
                AC_MSG_ERROR([*** SELinux support requested but libraries not 
found])
        fi
fi
AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])

# ------------------------------------------------------------------------------
have_xz=no
AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
if test "x$enable_xz" != "xno"; then
        PKG_CHECK_MODULES(XZ, [ liblzma ],
                [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) 
have_xz=yes], have_xz=no)
        if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
                AC_MSG_ERROR([*** Xz support requested but libraries not found])
        fi
fi
AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])

# ------------------------------------------------------------------------------
AC_ARG_ENABLE([acl],
        AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
                [case "${enableval}" in
                        yes) have_acl=yes ;;
                        no) have_acl=no ;;
                        *) AC_MSG_ERROR(bad value ${enableval} for 
--disable-acl) ;;
                esac],
                [have_acl=auto])

if test "x${have_acl}" != xno ; then
        AC_CHECK_HEADERS(
                [sys/acl.h acl/libacl.h],
                [have_acl=yes],
                [if test "x$have_acl" = xyes ; then
                        AC_MSG_ERROR([*** ACL headers not found.])
                fi])

        AC_CHECK_LIB(
                [acl],
                [acl_get_file],
                [have_acl=yes],
                [if test "x$have_acl" = xyes ; then
                        AC_MSG_ERROR([*** libacl not found.])
                fi])

        if test "x$have_acl" = xyes ; then
                ACL_LIBS="-lacl"
                AC_DEFINE(HAVE_ACL, 1, [ACL available])
        else
                have_acl=no
        fi
else
        ACL_LIBS=
fi
AC_SUBST(ACL_LIBS)
AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])

# ------------------------------------------------------------------------------
AC_ARG_WITH(usb-ids-path,
        [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
        [USB_DATABASE=${withval}],
        [if test -n "$usbids" ; then
                USB_DATABASE="$usbids"
        else
                PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
                AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids 
usbutils)])
        fi])
AC_MSG_CHECKING([for USB database location])
AC_MSG_RESULT([$USB_DATABASE])
AC_SUBST(USB_DATABASE)

AC_ARG_WITH(pci-ids-path,
        [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
        [PCI_DATABASE=${withval}],
        [if test -n "$pciids" ; then
                PCI_DATABASE="$pciids"
        else
                PKG_CHECK_MODULES(LIBPCI, libpci >= 3)
                AC_SUBST([PCI_DATABASE], [$($PKG_CONFIG --variable=idsdir 
libpci)/pci.ids])
        fi])
AC_MSG_CHECKING([for PCI database location])
AC_MSG_RESULT([$PCI_DATABASE])
AC_SUBST(PCI_DATABASE)

# ------------------------------------------------------------------------------
AC_ARG_WITH(firmware-path,
       AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
          [Firmware search path 
(default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
       [], 
[with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"])
OLD_IFS=$IFS
IFS=:
for i in $with_firmware_path; do
       if test "x${FIRMWARE_PATH}" = "x"; then
              FIRMWARE_PATH="\\\"${i}/\\\""
       else
              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
       fi
done
IFS=$OLD_IFS
AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH])

# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable 
manpages]))
if test "x$enable_manpages" != "xno"; then
        have_manpages=yes
fi
AM_CONDITIONAL(ENABLE_MANPAGES, [test "$have_manpages" = "yes"])

AC_ARG_WITH([rootprefix],
        AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for 
config files and kernel modules]),
        [], [with_rootprefix=${ac_default_prefix}])

AC_ARG_WITH([rootlibdir],
        AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries 
necessary for boot]),
        [],
        [with_rootlibdir=${libdir}])

AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])

AC_CONFIG_FILES([
        Makefile
])

AC_OUTPUT
AC_MSG_RESULT([
        $PACKAGE_NAME $VERSION

        SELinux:                 ${have_selinux}
        XZ:                      ${have_xz}
        ACL:                     ${have_acl}
        firmware path:           ${FIRMWARE_PATH}
        usb.ids:                 ${USB_DATABASE}
        pci.ids:                 ${PCI_DATABASE}

        prefix:                  ${prefix}
        rootprefix:              ${with_rootprefix}
        sysconf dir:             ${sysconfdir}
        datarootdir:             ${datarootdir}
        includedir:              ${includedir}
        include_prefix:          ${INCLUDE_PREFIX}
        libexec dir:             ${libexecdir}
        lib dir:                 ${libdir}
        rootlib dir:             ${with_rootlibdir}
        man pages:               ${have_manpages}

        CFLAGS:                  ${CFLAGS}
        CPPLAGS:                 ${CPPFLAGS}
        LDFLAGS:                 ${LDFLAGS}
])
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to