diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-06-09 11:30:00 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-06-09 12:26:55 -1000 |
commit | 8289217588d4916f595894dcec136e9ab738097e (patch) | |
tree | a5c7dbca3051d578f60bd16d0e02ed0f9a04c4bd | |
parent | 99dce090dd668d81a796b51d8503435a66f0e1f9 (diff) | |
download | anaconda-8289217588d4916f595894dcec136e9ab738097e.tar.gz anaconda-8289217588d4916f595894dcec136e9ab738097e.tar.xz anaconda-8289217588d4916f595894dcec136e9ab738097e.zip |
Add toplevel Makefile.am and configure.ac
Add main Makefile.am and configure.ac files. Add config.rpath, which is
required for the gettext template macros. Added a bootstrap script to
generate the configure script and Makefile.in templates.
-rw-r--r-- | Makefile.am | 178 | ||||
-rwxr-xr-x | bootstrap | 8 | ||||
-rw-r--r-- | config.rpath | 666 | ||||
-rw-r--r-- | configure.ac | 263 |
4 files changed, 1115 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..67e4e2f3a --- /dev/null +++ b/Makefile.am @@ -0,0 +1,178 @@ +# Makefile.am for anaconda +# +# Copyright (C) 2009 Red Hat, Inc. +# +# This program 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. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +# +# Author: David Cantrell <dcantrell@redhat.com> + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = isys po loader booty storage textw utils scripts bootdisk \ + installclasses iw command-stubs ui docs pixmaps tests fonts \ + gptsync liveinst + +EXTRA_DIST = ChangeLog config.rpath COPYING pychecker-false-positives \ + pycheckrc-for-anaconda runpychecker.sh lang-table \ + anaconda.spec.in + +MAINTAINERCLEANFILES = Makefile.in config.guess config.h.in config.sub \ + depcomp install-sh ltmain.sh missing ABOUT-NLS \ + INSTALL aclocal.m4 configure *.pyc py-compile + +CLEANFILES = *~ ChangeLog lang-names anaconda.spec + +MOSTLYCLEANDIRS = m4 + +dist_noinst_DATA = $(PACKAGE_NAME).spec + +bin_PROGRAMS = mini-wm +dist_sbin_SCRIPTS = anaconda + +mini_wm_CFLAGS = $(GTK_X11_CFLAGS) +mini_wm_LDFLAGS = $(GTK_X11_LIBS) +mini_wm_SOURCES = mini-wm.c + +udevdir = /lib/udev/rules.d +dist_udev_DATA = 70-anaconda.rules + +langdir = $(libdir)/$(PACKAGE_NAME) +lang_DATA = lang-names +dist_lang_DATA = lang-table + +pkgpyexecdir = $(libdir)/$(PACKAGE_NAME) +pkgpythondir = $(libdir)/$(PACKAGE_NAME) + +pkgpyexec_LTLIBRARIES = xutils.la +xutils_la_CFLAGS = $(PYTHON_INCLUDES) $(GDK_CFLAGS) -fno-strict-aliasing +xutils_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) $(GDK_LDFLAGS) +xutils_la_LIBADD = $(PYTHON_LIBS) $(GDK_LIBS) +xutils_la_SOURCES = xutils.c + +# anaconda Python code +anacondadir = $(libdir)/$(PACKAGE_NAME) +anaconda_PYTHON = *.py + +PYCHECKERPATH = isys:textw:iw:installclasses:/usr/share/system-config-date +PYCHECKEROPTS = -F pycheckrc-for-anaconda +ARCHIVE_TAG = $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE) + +$(PACKAGE_NAME).spec: $(PACKAGE_NAME).spec.in + sed -e 's/#VERSION#/$(PACKAGE_VERSION)/' < $< > $@ + +lang-names: lang-table + PYTHONPATH="." $(PYTHON) scripts/getlangnames.py > lang-names + +testiso: install + @if [ "$(REPO)" = "" ]; then echo "ERROR: Need a repo to pull packages from!" ; exit 1 ; fi + @pushd scripts ; sudo ./buildinstall --version $(PACKAGE_VERSION) --product $(PACKAGE_NAME) --release $(PACKAGE_NAME)-$(PACKAGE_VERSION) --output $(shell pwd)/outiso --updates $(DESTDIR) $(REPO) ; popd ; cp outiso/images/boot.iso ./boot.iso ; sudo rm -rf outiso + @echo + @echo "Test iso is located at ./boot.iso" + +tag: + @git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG) + @echo "Tagged as $(ARCHIVE_TAG)" + +scratch: + $(MAKE) ARCHIVE_TAG=HEAD dist + +archive: + $(MAKE) tag + $(MAKE) dist + +src: archive + @rpmbuild -ts --nodeps $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2 || exit 1 + @rm -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2 + +ChangeLog: + (GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + +pycheck: + PYTHONPATH=$(PYCHECKERPATH) pychecker $(PYCHECKEROPTS) *.py textw/*.py iw/*.py installclasses/*.py storage/*.py | grep -v "__init__() not called" + +pycheck-file: + PYTHONPATH=.:$(PYCHECKERPATH) pychecker $(PYCHECKEROPTS) $(CHECK) | grep -v "__init__() not called" + +api: + doxygen docs/api.cfg + +rpmlog: + @git log --pretty="format:- %s (%ae)" $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE).. | sed -e 's/@.*)/)/' | sed -e 's/%/%%/g' + @echo + +bumpver: + @NEWSUBVER=$$((`echo $(PACKAGE_VERSION) |cut -d . -f 4` + 1)) ; \ + NEWVERSION=`echo $(PACKAGE_VERSION).$$NEWSUBVER |cut -d . -f 1-3,5` ; \ + DATELINE="* `date "+%a %b %d %Y"` `git config user.name` <`git config user.email`> - $$NEWVERSION-1" ; \ + cl=`grep -n %changelog anaconda.spec.in |cut -d : -f 1` ; \ + tail --lines=+$$(($$cl + 1)) anaconda.spec.in > speclog ; \ + make --quiet rpmlog 2>/dev/null | fold -s -w 77 | while read line ; do \ + if [ ! "$$(echo $$line | cut -c-2)" = "- " ]; then \ + echo " $$line" ; \ + else \ + echo "$$line" ; \ + fi ; \ + done > newspeclog ; \ + (head -n $$cl anaconda.spec.in ; echo "$$DATELINE" ; cat newspeclog ; echo ""; cat speclog) > anaconda.spec.in.new ; \ + mv anaconda.spec.in.new anaconda.spec.in ; rm -f speclog ; rm -f newspeclog ; \ + sed -i "s/AC_INIT(\[$(PACKAGE_NAME)\], \[$(PACKAGE_VERSION)\], \[$(PACKAGE_BUGREPORT\])/AC_INIT(\[$(PACKAGE_NAME)\], \[$$NEWVERSION\], \[$(PACKAGE_BUGREPORT\])/" configure.ac + +install-buildrequires: + yum install $$(grep BuildRequires: anaconda.spec.in | cut -d ' ' -f 2) + +# Generate an updates.img based on the changed files since the release +# was tagged. Updates are copied to ./updates-img and then the image is +# created. By default, the updates subdirectory is removed after the +# image is made, but if you want to keep it around, run: +# make updates.img KEEP=y +# And since shell is both stupid and amusing, I only match the first +# character to be a 'y' or 'Y', so you can do: +# make updates.img KEEP=yosemite +# Ahh, shell. +updates: + @if [ ! -d updates-img ]; then \ + mkdir updates-img ; \ + fi ; \ + build_isys="$$(git diff --stat $(ARCHIVE_TAG) isys | grep " | " | cut -d ' ' -f 2 | egrep "(Makefile|\.h|\.c)$$")" ; \ + git diff --stat $(ARCHIVE_TAG) | grep " | " | \ + grep -v "\.spec" | grep -v "Makefile" | grep -v "\.c\ " | \ + grep -v "\.h" | grep -v "\.sh" | \ + while read sourcefile stuff ; do \ + dn="$$(echo $$sourcefile | cut -d '/' -f 1)" ; \ + case $$dn in \ + installclasses|storage|booty) \ + rm -rf updates-img/$$dn ; \ + cp -a $$dn updates-img ; \ + find updates-img/$$dn -type f | egrep 'Makefile|\.pyc' | xargs rm -f ;; \ + loader|po|scripts|command-stubs|tests|bootdisk|docs|fonts|utils|gptsync) \ + continue ;; \ + *) \ + cp -a $$sourcefile updates-img ;; \ + esac ; \ + done ; \ + if [ ! -z "$$build_isys" ]; then \ + make -C isys ; \ + cp isys/_isys.so updates-img ; \ + fi ; \ + cd updates-img ; \ + echo -n "Creating updates.img..." ; \ + ( find . | cpio -c -o | gzip -9c ) > ../updates.img ; \ + cd .. ; \ + keep="$$(echo $(KEEP) | cut -c1 | tr [a-z] [A-Z])" ; \ + if [ ! "$$keep" = "Y" ]; then \ + rm -rf updates-img ; \ + fi + +# DEPRECATED TARGETS: +archive-no-tag: dist diff --git a/bootstrap b/bootstrap new file mode 100755 index 000000000..99e3830d0 --- /dev/null +++ b/bootstrap @@ -0,0 +1,8 @@ +#!/bin/bash +aclocal -I m4 +libtoolize --copy --force +autoconf +autoheader +touch config.h.in +automake --foreign --add-missing --copy +rm -rf autom4te.cache diff --git a/config.rpath b/config.rpath new file mode 100644 index 000000000..c547c6882 --- /dev/null +++ b/config.rpath @@ -0,0 +1,666 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2007 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF + +# How to pass a linker flag through the compiler. +wl="$escaped_wl" + +# Static library suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally "so"). +shlibext="$shlibext" + +# Format of library name prefix. +libname_spec="$escaped_libname_spec" + +# Library names that the linker finds when passed -lNAME. +library_names_spec="$escaped_library_names_spec" + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="$hardcode_libdir_separator" + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct="$hardcode_direct" + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L="$hardcode_minus_L" + +EOF diff --git a/configure.ac b/configure.ac new file mode 100644 index 000000000..099826dda --- /dev/null +++ b/configure.ac @@ -0,0 +1,263 @@ +# configure.ac for anaconda +# +# Copyright (C) 2009 Red Hat, Inc. +# +# This program 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. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +# +# Author: David Cantrell <dcantrell@redhat.com> + +m4_define(python_required_version, 2.5) + +AC_PREREQ([2.63]) +AC_INIT([anaconda], [11.5.0.53], [anaconda-devel-list@redhat.com]) +AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2]) + +AC_CONFIG_SRCDIR([loader/loader.c]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_DEFINE_UNQUOTED([BUILD_DATE], ["`date +%m%d%Y`"], [Date of anaconda build]) + +# Checks for programs. +AC_PROG_AWK +AC_PROG_GREP +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL + +AM_GNU_GETTEXT([external]) + +# Checks for libraries. +AC_CHECK_LIB([X11], [XGetWindowAttributes], + [AC_SUBST(X11_LIBS, [-lX11])], + [AC_MSG_FAILURE([*** libX11 not usable.])]) + +AC_CHECK_LIB([audit], [audit_open], + [AC_SUBST(AUDIT_LIBS, [-laudit])], + [AC_MSG_FAILURE([*** libaudit not usable.])]) + +AC_CHECK_LIB([blkid], [blkid_get_cache], + [AC_SUBST(BLKID_LIBS, [-lblkid])], + [AC_MSG_FAILURE([*** libblkid not usable.])]) + +AC_CHECK_LIB([checkisomd5], [mediaCheckFile], + [AC_SUBST(CHECKISOMD5_LIBS, [-lcheckisomd5])], + [AC_MSG_FAILURE([*** libcheckisomd5 not usable.])]) + +AC_CHECK_LIB([ext2fs], [ext2fs_initialize], + [AC_SUBST(EXT2FS_LIBS, [-lext2fs])], + [AC_MSG_FAILURE([*** libext2fs not usable.])]) + +AC_CHECK_LIB([iscsi], [libiscsi_get_firmware_network_config], + [AC_SUBST(ISCSI_LIBS, [-liscsi])], + [AC_MSG_FAILURE([*** libiscsi not usable.])]) + +AC_CHECK_LIB([newt], [newtInit], + [AC_SUBST(NEWT_LIBS, [-lnewt])], + [AC_MSG_FAILURE([*** libnewt not usable.])]) + +AC_CHECK_LIB([popt], [poptGetContext], + [AC_SUBST(POPT_LIBS, [-lpopt])], + [AC_MSG_FAILURE([*** libpopt not usable.])]) + +AC_CHECK_LIB([slang], [SLang_get_int_size], + [AC_SUBST(SLANG_LIBS, [-lslang])], + [AC_MSG_FAILURE([*** libslang not usable.])]) + +AC_CHECK_LIB([z], [zlibVersion], + [AC_SUBST(ZLIB_LIBS, [-lz])], + [AC_MSG_FAILURE([*** libz not usable.])]) + +# Checks for header files. +AC_PATH_X +AC_FUNC_ALLOCA +AC_HEADER_RESOLV +AC_HEADER_MAJOR +AC_CHECK_HEADERS([argz.h arpa/inet.h fcntl.h inttypes.h libintl.h limits.h \ + malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h \ + string.h strings.h sys/ioctl.h sys/mount.h sys/param.h \ + sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h \ + unistd.h utime.h wchar.h], + [], + [AC_MSG_FAILURE([*** Header file $ac_header not found.])], + []) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_UID_T +AC_C_INLINE +AC_TYPE_INT32_T +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_CHECK_MEMBERS([struct stat.st_rdev]) +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + +# Checks for library functions. +AC_FUNC_CHOWN +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK +AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_FUNC_REALLOC +AC_CHECK_FUNCS([dup2 fdatasync ftruncate getcwd gethostbyname gettimeofday \ + lchown memmove memset mkdir mkfifo munmap realpath select \ + setenv sethostname socket strcasecmp strchr strcspn strdup \ + strerror strncasecmp strndup strrchr strstr strtol strtoul \ + strverscmp uname utime wcwidth], + [], + [AC_MSG_FAILURE([*** Required function $ac_func not found.])]) + +AM_PATH_PYTHON(python_required_version) +AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers or library)]) + +# Check for libraries we need that provide pkg-config scripts +PKG_PROG_PKG_CONFIG([0.23]) +PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-2.0 >= 2.16.1]) +PKG_CHECK_MODULES([GDK], [gdk-2.0 >= 2.16.1]) +PKG_CHECK_MODULES([NETWORKMANAGER], [NetworkManager >= 0.7.1]) +PKG_CHECK_MODULES([LIBNL], [libnl-1 >= 1.0]) +PKG_CHECK_MODULES([LIBNM_GLIB], [libnm_glib >= 0.7.1]) +PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= 1.02.17]) + +# Set $RPM_OPT_FLAGS if we don't have it +if test -z $RPM_OPT_FLAGS ; then + CFLAGS="$CFLAGS -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions" +else + CFLAGS="$CFLAGS $RPM_OPT_FLAGS" +fi + +# SELinux support can be enabled or disabled +AC_ARG_WITH(selinux, + AC_HELP_STRING([--enable-selinux], + [enable SELinux support (default is yes)]), + [selinux=$enableval], + [selinux=yes]) +if test x$selinux = xyes ; then + AC_CHECK_LIB([selinux], [matchpathcon], [], + [AC_MSG_FAILURE([*** libselinux not usable.])]) + AC_CHECK_LIB([selinux], [lsetfilecon], [], + [AC_MSG_FAILURE([*** libselinux not usable.])]) + + selinux_libs="-lselinux -laudit" + AC_SUBST(SELINUX_CFLAGS, [-DUSESELINUX=1]) + AC_SUBST(SELINUX_LIBS, [$selinux_libs]) +fi + +# NFS support can, in theory, be enabled or disabled +AC_ARG_WITH(nfs, + AC_HELP_STRING([--enable-nfs], + [enable NFS support (default is yes)]), + [nfs=$enableval], + [nfs=yes]) +if test x$selinux = xyes ; then + AC_SUBST(NFS_CFLAGS, [-DHAVE_NFS]) +fi + +# Add remaining compiler flags we want to use +CFLAGS="$CFLAGS -Wall -Werror -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" + +# Filter CFLAGS (remove duplicate flags) +cflags_filter() { + have= + first=1 + for flag in $* ; do + if test -z "`echo $have | grep -- $flag`" ; then + if test x$first == x1 ; then + first=2 + else + echo -n " " + fi + echo -n $flag + have="$have $flag" + fi + done +} +CFLAGS="`cflags_filter $CFLAGS`" + +# Unset $(LIBS) because different programs and libraries will have different +# lists of libraries to link with, we don't want everything linking against +# all libraries we checked for. +LIBS= + +# Get the release number from the spec file +rel="`awk '/Release:/ { split($2, r, "%"); print r[[1]] }' anaconda.spec.in`" +AC_SUBST(PACKAGE_RELEASE, [$rel]) + +# Set $(ARCH) and arch-related tests +s_arch="`uname -m | sed -e s/i.86/i386/ -e s/sparc.*/sparc/ -e s/ppc.*/ppc/`" +AC_SUBST(ARCH, [$s_arch]) + +AM_CONDITIONAL(IS_FONT_ARCH, + [test x$s_arch != xs390 && test x$s_arch != xs390x]) + +AM_CONDITIONAL(IS_LIVEINST_ARCH, + [test x$s_arch == xppc || test x$s_arch == xi386 || test x$s_arch == xx86_64]) + +AM_CONDITIONAL(IS_GPTSYNC_ARCH, + [test x$s_arch == xi386 || test x$s_arch == xx86_64]) + +AM_CONDITIONAL(IS_KEYMAPS_OVERRIDE_ARCH, + [test x$s_arch == xi386 || test x$s_arch == xppc || test x$s_arch == xx86_64]) + +AM_CONDITIONAL(IS_I386, + [test x$s_arch == xi386]) + +AM_CONDITIONAL(IS_PPC, + [test x$s_arch == xppc]) + +AM_CONDITIONAL(IS_S390, + [test x$s_arch == xs390 || test x$s_arch == xs390x]) + +AM_CONDITIONAL(IS_X86_64, + [test x$s_arch == xx86_64]) + +AC_CONFIG_FILES([Makefile + bootdisk/Makefile + bootdisk/i386/Makefile + bootdisk/ppc/Makefile + bootdisk/s390x/Makefile + bootdisk/x86_64/Makefile + booty/Makefile + command-stubs/Makefile + docs/Makefile + fonts/Makefile + gptsync/Makefile + installclasses/Makefile + isys/Makefile + iw/Makefile + liveinst/Makefile + liveinst/console.apps/Makefile + liveinst/pam.d/Makefile + loader/Makefile + pixmaps/Makefile + po/Makefile.in + scripts/Makefile + storage/Makefile + storage/devicelibs/Makefile + storage/formats/Makefile + tests/Makefile + tests/storage/Makefile + tests/storage/devicelibs/Makefile + textw/Makefile + ui/Makefile + utils/Makefile]) +AC_OUTPUT |