1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix LD_FLAGS->LDFLAGS. LD_DEPS->LDDEPS.

Update configure script: add --disable-selinux & some missing messages.
This commit is contained in:
Alasdair Kergon 2004-06-28 14:01:24 +00:00
parent 3e5cc2beb9
commit 80992638e1
6 changed files with 2081 additions and 5082 deletions

View File

@ -1,5 +1,8 @@
Version 2.00.19 - Version 2.00.19 -
============================== ==============================
Added --disable-selinux to configure script.
LD_FLAGS->LDFLAGS & LD_DEPS->LDDEPS in configure script.
Add init_debug to clvmd.
Version 2.00.18 - 24 June 2004 Version 2.00.18 - 24 June 2004
============================== ==============================

6558
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -17,12 +17,15 @@
## simplifies distribution package building considerably. ## simplifies distribution package building considerably.
################################################################################ ################################################################################
################################################################################
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(lib/device/dev-cache.h) AC_INIT(lib/device/dev-cache.h)
################################################################################
dnl setup the directory where autoconf has auxilary files dnl setup the directory where autoconf has auxilary files
AC_CONFIG_AUX_DIR(autoconf) AC_CONFIG_AUX_DIR(autoconf)
################################################################################
dnl Checks for programs. dnl Checks for programs.
AC_PROG_AWK AC_PROG_AWK
AC_PROG_CC AC_PROG_CC
@ -31,11 +34,46 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_RANLIB AC_PROG_RANLIB
################################################################################
dnl Get system type
AC_CANONICAL_SYSTEM
case "$host_os" in
linux*)
CFLAGS="$CFLAGS"
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
SOFLAG="-shared"
DEVMAPPER=yes
ODIRECT=yes
SELINUX=yes
CLUSTER=internal
FSADM=no ;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
CLDFLAGS="$CLDFLAGS"
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
LDDEPS="$LDDEPS"
LDFLAGS="$LDFLAGS"
SOFLAG="-dynamiclib"
DEVMAPPER=no
ODIRECT=no
SELINUX=no
CLUSTER=none
FSADM=no ;;
esac
################################################################################
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h) AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h)
################################################################################
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
@ -45,74 +83,61 @@ AC_TYPE_SIZE_T
AC_STRUCT_ST_RDEV AC_STRUCT_ST_RDEV
AC_HEADER_TIME AC_HEADER_TIME
dnl Get system type ################################################################################
AC_CANONICAL_SYSTEM
case "$host_os" in
linux*)
CFLAGS=
CLDFLAGS="-Wl,--version-script,.export.sym"
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LD_DEPS=".export.sym"
LD_FLAGS="-Wl,--export-dynamic"
SOFLAG="-shared"
DEVMAPPER=yes
ODIRECT=yes
CLUSTER=internal
FSADM=no ;;
darwin*)
CFLAGS="-no-cpp-precomp -fno-common"
CLDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
LD_DEPS=
LD_FLAGS=
SOFLAG="-dynamiclib"
DEVMAPPER=no
ODIRECT=no
CLUSTER=none
FSADM=no ;;
esac
dnl -- prefix is /usr by default, the exec_prefix default is setup later dnl -- prefix is /usr by default, the exec_prefix default is setup later
AC_PREFIX_DEFAULT(/usr) AC_PREFIX_DEFAULT(/usr)
OWNER="root" ################################################################################
GROUP="root" dnl -- Parallel make jobs?
AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2)
################################################################################
dnl -- setup the ownership of the files dnl -- setup the ownership of the files
echo $ac_n "Setting file owner to""... $ac_c" 1>&6
OWNER="root"
AC_ARG_WITH(user, AC_ARG_WITH(user,
[ --with-user=USER Set the owner of installed files ], [ --with-user=USER Set the owner of installed files ],
[ OWNER="$withval" ]) [ OWNER="$withval" ])
echo "$ac_t""$OWNER" 1>&6
if test x$OWNER != x; then if test x$OWNER != x; then
OWNER="-o $OWNER" OWNER="-o $OWNER"
fi fi
################################################################################
dnl -- setup the group ownership of the files dnl -- setup the group ownership of the files
echo $ac_n "Setting group owner to""... $ac_c" 1>&6
GROUP="root"
AC_ARG_WITH(group, AC_ARG_WITH(group,
[ --with-group=GROUP Set the group owner of installed files ], [ --with-group=GROUP Set the group owner of installed files ],
[ GROUP="$withval" ]) [ GROUP="$withval" ])
echo "$ac_t""$GROUP" 1>&6
if test x$GROUP != x; then if test x$GROUP != x; then
GROUP="-g $GROUP" GROUP="-g $GROUP"
fi fi
################################################################################
dnl -- LVM1 tool fallback option dnl -- LVM1 tool fallback option
echo $ac_n "checking whether to enable lvm1 fallback""... $ac_c" 1>&6
AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if AC_ARG_ENABLE(lvm1_fallback, [ --enable-lvm1_fallback Use this to fall back and use LVM1 binaries if
device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no) device-mapper is missing from the kernel], LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
echo "$ac_t""$LVM1_FALLBACK" 1>&6
if test x$LVM1_FALLBACK = xyes; then if test x$LVM1_FALLBACK = xyes; then
CFLAGS="$CFLAGS -DLVM1_FALLBACK" CFLAGS="$CFLAGS -DLVM1_FALLBACK"
fi fi
################################################################################
dnl -- format1 inclusion type dnl -- format1 inclusion type
echo $ac_n "checking whether to include support for lvm1 metadata""... $ac_c" 1>&6
AC_ARG_WITH(lvm1, AC_ARG_WITH(lvm1,
[ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none [ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
[TYPE=internal] ], [TYPE=internal] ],
[ LVM1="$withval" ], [ LVM1="$withval" ],
[ LVM1="internal" ]) [ LVM1="internal" ])
echo "$ac_t""$LVM1" 1>&6
if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]]; if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
then AC_MSG_ERROR( then AC_MSG_ERROR(
@ -125,12 +150,15 @@ if test x$LVM1 = xinternal; then
CFLAGS="$CFLAGS -DLVM1_INTERNAL" CFLAGS="$CFLAGS -DLVM1_INTERNAL"
fi fi
################################################################################
dnl -- format_pool inclusion type dnl -- format_pool inclusion type
echo $ac_n "checking whether to include support for GFS pool metadata""... $ac_c" 1>&6
AC_ARG_WITH(pool, AC_ARG_WITH(pool,
[ --with-pool=TYPE GFS pool read-only support: internal/shared/none [ --with-pool=TYPE GFS pool read-only support: internal/shared/none
[TYPE=internal] ], [TYPE=internal] ],
[ POOL="$withval" ], [ POOL="$withval" ],
[ POOL="internal" ]) [ POOL="internal" ])
echo "$ac_t""$POOL" 1>&6
if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]]; if [[ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]];
then AC_MSG_ERROR( then AC_MSG_ERROR(
@ -143,11 +171,14 @@ if test x$POOL = xinternal; then
CFLAGS="$CFLAGS -DPOOL_INTERNAL" CFLAGS="$CFLAGS -DPOOL_INTERNAL"
fi fi
################################################################################
dnl -- cluster_locking inclusion type dnl -- cluster_locking inclusion type
echo $ac_n "checking whether to include support for cluster locking""... $ac_c" 1>&6
AC_ARG_WITH(cluster, AC_ARG_WITH(cluster,
[ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none [ --with-cluster=TYPE Cluster LVM locking support: internal/shared/none
[TYPE=internal] ], [TYPE=internal] ],
[ CLUSTER="$withval" ]) [ CLUSTER="$withval" ])
echo "$ac_t""$CLUSTER" 1>&6
if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]]; if [[ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]];
then AC_MSG_ERROR( then AC_MSG_ERROR(
@ -160,14 +191,15 @@ if test x$CLUSTER = xinternal; then
CFLAGS="$CFLAGS -DCLUSTER_LOCKING_INTERNAL" CFLAGS="$CFLAGS -DCLUSTER_LOCKING_INTERNAL"
fi fi
AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2) ################################################################################
dnl -- snapshots inclusion type dnl -- snapshots inclusion type
echo $ac_n "checking whether to include snapshots""... $ac_c" 1>&6
AC_ARG_WITH(snapshots, AC_ARG_WITH(snapshots,
[ --with-snapshots=TYPE Snapshot support: internal/shared/none [ --with-snapshots=TYPE Snapshot support: internal/shared/none
[TYPE=internal] ], [TYPE=internal] ],
[ SNAPSHOTS="$withval" ], [ SNAPSHOTS="$withval" ],
[ SNAPSHOTS="internal" ]) [ SNAPSHOTS="internal" ])
echo "$ac_t""$SNAPSHOTS" 1>&6
if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]]; if [[ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]];
then AC_MSG_ERROR( then AC_MSG_ERROR(
@ -180,12 +212,15 @@ if test x$SNAPSHOTS = xinternal; then
CFLAGS="$CFLAGS -DSNAPSHOT_INTERNAL" CFLAGS="$CFLAGS -DSNAPSHOT_INTERNAL"
fi fi
################################################################################
dnl -- mirrors inclusion type dnl -- mirrors inclusion type
echo $ac_n "checking whether to include mirrors""... $ac_c" 1>&6
AC_ARG_WITH(mirrors, AC_ARG_WITH(mirrors,
[ --with-mirrors=TYPE Mirror support: internal/shared/none [ --with-mirrors=TYPE Mirror support: internal/shared/none
[TYPE=internal] ], [TYPE=internal] ],
[ MIRRORS="$withval" ], [ MIRRORS="$withval" ],
[ MIRRORS="internal" ]) [ MIRRORS="internal" ])
echo "$ac_t""$MIRRORS" 1>&6
if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]]; if [[ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]];
then AC_MSG_ERROR( then AC_MSG_ERROR(
@ -198,35 +233,53 @@ if test x$MIRRORS = xinternal; then
CFLAGS="$CFLAGS -DMIRRORED_INTERNAL" CFLAGS="$CFLAGS -DMIRRORED_INTERNAL"
fi fi
################################################################################
dnl Enables staticly-linked tools dnl Enables staticly-linked tools
echo $ac_n "checking whether to use static linking""... $ac_c" 1>&6
AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to their libraries AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to their libraries
statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no) statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no)
echo "$ac_t""$STATIC_LINK" 1>&6
################################################################################
dnl Enable readline dnl Enable readline
echo $ac_n "checking whether to enable readline""... $ac_c" 1>&6
AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support], \ AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support], \
READLINE=$enableval, READLINE=no) READLINE=$enableval, READLINE=no)
echo "$ac_t""$READLINE" 1>&6
if test x$READLINE = xyes; then if test x$READLINE = xyes; then
CFLAGS="$CFLAGS -DREADLINE_SUPPORT" CFLAGS="$CFLAGS -DREADLINE_SUPPORT"
fi fi
################################################################################
dnl Disable selinux
echo $ac_n "checking whether to enable selinux support""... $ac_c" 1>&6
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support], \
SELINUX=$enableval)
echo "$ac_t""$SELINUX" 1>&6
################################################################################
dnl Build cluster LVM daemon dnl Build cluster LVM daemon
echo $ac_n "checking whether to build cluster LVM daemon""... $ac_c" 1>&6
AC_ARG_WITH(clvmd, [ --with-clvmd Build cluster LVM Daemon], \ AC_ARG_WITH(clvmd, [ --with-clvmd Build cluster LVM Daemon], \
CLVMD=$withval, CLVMD=no) CLVMD=$withval, CLVMD=no)
echo "$ac_t""$CLVMD" 1>&6
dnl If clvmd enabled and not cluster locking, automgically include the locking. dnl If clvmd enabled and not cluster locking, automgically include the locking.
if test x$CLVMD = xyes && test x$CLUSTER = xnone; then if test x$CLVMD = xyes && test x$CLUSTER = xnone; then
CLUSTER=internal CLUSTER=internal
fi fi
echo "$ac_t""$CLVMD" 1>&6
echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6 ################################################################################
dnl Enable Debugging dnl Enable Debugging
echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \ AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \
DEBUG=yes, DEBUG=no) DEBUG=yes, DEBUG=no)
echo "$ac_t""$DEBUG" 1>&6 echo "$ac_t""$DEBUG" 1>&6
echo $ac_n "checking whether to enable device-mapper""... $ac_c" 1>&6 ################################################################################
dnl Disable devmapper dnl Disable devmapper
echo $ac_n "checking whether to use device-mapper""... $ac_c" 1>&6
AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \ AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \
DEVMAPPER=no) DEVMAPPER=no)
echo "$ac_t""$DEVMAPPER" 1>&6 echo "$ac_t""$DEVMAPPER" 1>&6
@ -235,8 +288,9 @@ if test x$DEVMAPPER = xyes; then
CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT" CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT"
fi fi
echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6 ################################################################################
dnl Disable O_DIRECT dnl Disable O_DIRECT
echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6
AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT], \ AC_ARG_ENABLE(o_direct, [ --disable-o_direct Disable O_DIRECT], \
ODIRECT=no) ODIRECT=no)
echo "$ac_t""$ODIRECT" 1>&6 echo "$ac_t""$ODIRECT" 1>&6
@ -245,8 +299,9 @@ if test x$ODIRECT = xyes; then
CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT" CFLAGS="$CFLAGS -DO_DIRECT_SUPPORT"
fi fi
echo $ac_n "checking whether to compile liblvm2cmd.so""... $ac_c" 1>&6 ################################################################################
dnl Enable cmdlib dnl Enable cmdlib
echo $ac_n "checking whether to compile liblvm2cmd.so""... $ac_c" 1>&6
AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library], \ AC_ARG_ENABLE(cmdlib, [ --enable-cmdlib Build shared command library], \
CMDLIB=yes, CMDLIB=no) CMDLIB=yes, CMDLIB=no)
echo "$ac_t""$CMDLIB" 1>&6 echo "$ac_t""$CMDLIB" 1>&6
@ -255,22 +310,26 @@ if test x$CMDLIB = xyes; then
CFLAGS="$CFLAGS -DCMDLIB" CFLAGS="$CFLAGS -DCMDLIB"
fi fi
echo $ac_n "checking whether to enable fsadm""... $ac_c" 1>&6 ################################################################################
dnl Enable fsadm dnl Enable fsadm
echo $ac_n "checking whether to build fsadm""... $ac_c" 1>&6
AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm], FSADM=yes) AC_ARG_ENABLE(fsadm, [ --enable-fsadm Enable fsadm], FSADM=yes)
echo "$ac_t""$FSADM" 1>&6 echo "$ac_t""$FSADM" 1>&6
################################################################################
dnl Mess with default exec_prefix dnl Mess with default exec_prefix
if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
then exec_prefix=""; then exec_prefix="";
fi; fi;
################################################################################
dnl Checks for library functions. dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_CHECK_FUNCS(mkdir rmdir uname) AC_CHECK_FUNCS(mkdir rmdir uname)
################################################################################
dnl check for termcap (Shamelessly copied from parted 1.4.17) dnl check for termcap (Shamelessly copied from parted 1.4.17)
if test x$READLINE = xyes; then if test x$READLINE = xyes; then
AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, , AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, ,
@ -288,6 +347,7 @@ Note: (n)curses also seems to work as a substitute for termcap. This was
) )
fi fi
################################################################################
dnl Check for dlopen dnl Check for dlopen
AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no) AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
@ -298,9 +358,10 @@ else
HAVE_LIBDL=no HAVE_LIBDL=no
fi fi
################################################################################
dnl Check for shared/static conflicts dnl Check for shared/static conflicts
if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared -o \ if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
"x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \ -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
\) -a "x$STATIC_LINK" = xyes ]]; \) -a "x$STATIC_LINK" = xyes ]];
then AC_MSG_ERROR( then AC_MSG_ERROR(
Features cannot be 'shared' when building statically Features cannot be 'shared' when building statically
@ -308,17 +369,24 @@ Features cannot be 'shared' when building statically
exit exit
fi fi
################################################################################
dnl Check for is_selinux_enabled dnl Check for is_selinux_enabled
if test x$SELINUX = xyes; then
AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no) AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
if test x$HAVE_SELINUX = xyes; then if test x$HAVE_SELINUX = xyes; then
CFLAGS="$CFLAGS -DHAVE_SELINUX" CFLAGS="$CFLAGS -DHAVE_SELINUX"
LIBS="-lselinux $LIBS" LIBS="-lselinux $LIBS"
else
echo "Disabling selinux" 1>&6
fi
fi fi
################################################################################
dnl Check for getopt dnl Check for getopt
AC_CHECK_HEADERS(getopt.h, CFLAGS="$CFLAGS -DHAVE_GETOPTLONG") AC_CHECK_HEADERS(getopt.h, CFLAGS="$CFLAGS -DHAVE_GETOPTLONG")
################################################################################
dnl Check for readline (Shamelessly copied from parted 1.4.17) dnl Check for readline (Shamelessly copied from parted 1.4.17)
if test x$READLINE = xyes; then if test x$READLINE = xyes; then
AC_CHECK_LIB(readline, readline, , AC_CHECK_LIB(readline, readline, ,
@ -336,6 +404,7 @@ package as well (which may be called readline-devel or something similar).
fi fi
################################################################################
echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6 echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6
dnl Internationalisation stuff dnl Internationalisation stuff
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\ AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\
@ -358,6 +427,7 @@ if test x$INTL = xyes; then
[ LOCALEDIR='${prefix}/share/locale' ]) [ LOCALEDIR='${prefix}/share/locale' ])
fi fi
################################################################################
AC_ARG_WITH(confdir, AC_ARG_WITH(confdir,
[ --with-confdir=DIR Configuration files in DIR [/etc]], [ --with-confdir=DIR Configuration files in DIR [/etc]],
[ CONFDIR="$withval" ], [ CONFDIR="$withval" ],
@ -369,12 +439,14 @@ AC_ARG_WITH(staticdir,
[ STATICDIR='${exec_prefix}/sbin' ]) [ STATICDIR='${exec_prefix}/sbin' ])
################################################################################
if test "-f VERSION"; then if test "-f VERSION"; then
LVM_VERSION="\"`cat VERSION`\"" LVM_VERSION="\"`cat VERSION`\""
else else
LVM_VERSION="Unknown" LVM_VERSION="Unknown"
fi fi
################################################################################
AC_SUBST(JOBS) AC_SUBST(JOBS)
AC_SUBST(STATIC_LINK) AC_SUBST(STATIC_LINK)
AC_SUBST(LVM1) AC_SUBST(LVM1)
@ -387,8 +459,8 @@ AC_SUBST(CFLAGS)
AC_SUBST(CLDFLAGS) AC_SUBST(CLDFLAGS)
AC_SUBST(CLDWHOLEARCHIVE) AC_SUBST(CLDWHOLEARCHIVE)
AC_SUBST(CLDNOWHOLEARCHIVE) AC_SUBST(CLDNOWHOLEARCHIVE)
AC_SUBST(LD_DEPS) AC_SUBST(LDDEPS)
AC_SUBST(LD_FLAGS) AC_SUBST(LDFLAGS)
AC_SUBST(SOFLAG) AC_SUBST(SOFLAG)
AC_SUBST(LIBS) AC_SUBST(LIBS)
AC_SUBST(LVM_VERSION) AC_SUBST(LVM_VERSION)
@ -408,6 +480,7 @@ AC_SUBST(CLVMD)
AC_SUBST(CLUSTER) AC_SUBST(CLUSTER)
AC_SUBST(FSADM) AC_SUBST(FSADM)
################################################################################
dnl First and last lines should not contain files to generate in order to dnl First and last lines should not contain files to generate in order to
dnl keep utility scripts running properly dnl keep utility scripts running properly
AC_OUTPUT( \ AC_OUTPUT( \

View File

@ -35,7 +35,7 @@ INSTALL_TARGETS = \
install_clvmd install_clvmd
clvmd: $(OBJECTS) $(top_srcdir)/lib/liblvm.a clvmd: $(OBJECTS) $(top_srcdir)/lib/liblvm.a
$(CC) -o clvmd $(OBJECTS) $(LD_FLAGS) $(LVMLIBS) $(LIBS) $(CC) -o clvmd $(OBJECTS) $(LDFLAGS) $(LVMLIBS) $(LIBS)
.PHONY: install_clvmd .PHONY: install_clvmd
@ -44,4 +44,3 @@ install_clvmd: $(TARGETS)
$(sbindir)/clvmd $(sbindir)/clvmd
install: $(INSTALL_TARGETS) install: $(INSTALL_TARGETS)

View File

@ -28,8 +28,8 @@ CFLAGS += @CFLAGS@
CLDFLAGS += @CLDFLAGS@ CLDFLAGS += @CLDFLAGS@
CLDWHOLEARCHIVE += @CLDWHOLEARCHIVE@ CLDWHOLEARCHIVE += @CLDWHOLEARCHIVE@
CLDNOWHOLEARCHIVE += @CLDNOWHOLEARCHIVE@ CLDNOWHOLEARCHIVE += @CLDNOWHOLEARCHIVE@
LD_DEPS += @LD_DEPS@ LDDEPS += @LDDEPS@
LD_FLAGS += @LD_FLAGS@ LDFLAGS += @LDFLAGS@
SOFLAG += @SOFLAG@ SOFLAG += @SOFLAG@
# Setup directory variables # Setup directory variables
@ -72,13 +72,13 @@ ifeq ("@INTL@", "yes")
CFLAGS += -DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\" CFLAGS += -DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\"
endif endif
LD_FLAGS += -L$(top_srcdir)/lib -L$(libdir) LDFLAGS += -L$(top_srcdir)/lib -L$(libdir)
#CFLAGS += -DDEBUG_POOL #CFLAGS += -DDEBUG_POOL
#CFLAGS += -DBOUNDS_CHECK #CFLAGS += -DBOUNDS_CHECK
#CFLAGS += -pg #CFLAGS += -pg
#LD_FLAGS += -pg #LDFLAGS += -pg
STRIP= STRIP=
#STRIP = -s #STRIP = -s
@ -145,7 +145,7 @@ $(TARGETS): $(OBJECTS)
%.so: %.o %.so: %.o
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
$(LIB_SHARED): $(OBJECTS) $(LD_DEPS) $(LIB_SHARED): $(OBJECTS) $(LDDEPS)
$(CC) $(SOFLAG) -Wl,-soname,$(notdir $@).$(LIB_VERSION) \ $(CC) $(SOFLAG) -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
$(CLDFLAGS) $(OBJECTS) -o $@ $(CLDFLAGS) $(OBJECTS) -o $@
@ -166,11 +166,11 @@ $(LIB_STATIC): $(OBJECTS)
clean: $(SUBDIRS.clean) clean: $(SUBDIRS.clean)
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \ $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot) $(LD_DEPS) $(SOURCES:%.c=%.pot) $(LDDEPS)
distclean: $(SUBDIRS.distclean) distclean: $(SUBDIRS.distclean)
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \ $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot) $(LD_DEPS) \ $(SOURCES:%.c=%.pot) $(LDDEPS) \
config.cache config.log config.status \ config.cache config.log config.status \
Makefile make.tmpl core \ Makefile make.tmpl core \
version.h lvm2.po version.h lvm2.po

View File

@ -91,17 +91,17 @@ endif
include $(top_srcdir)/make.tmpl include $(top_srcdir)/make.tmpl
lvm: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a lvm: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a
$(CC) -o $@ $(OBJECTS) lvm.o $(LD_FLAGS) $(LVMLIBS) $(LIBS) -rdynamic $(CC) -o $@ $(OBJECTS) lvm.o $(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic
lvm.static: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a lvm.static: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a
$(CC) -o $@ $(OBJECTS) lvm.o -static $(LD_FLAGS) $(LVMLIBS) $(LIBS) \ $(CC) -o $@ $(OBJECTS) lvm.o -static $(LDFLAGS) $(LVMLIBS) $(LIBS) \
-rdynamic -rdynamic
liblvm2cmd.a: $(top_srcdir)/lib/liblvm.a $(OBJECTS) liblvm2cmd.a: $(top_srcdir)/lib/liblvm.a $(OBJECTS)
cat $(top_srcdir)/lib/liblvm.a > $@ cat $(top_srcdir)/lib/liblvm.a > $@
$(AR) rs $@ $(OBJECTS) $(AR) rs $@ $(OBJECTS)
liblvm2cmd.so: liblvm2cmd.a $(LD_DEPS) liblvm2cmd.so: liblvm2cmd.a $(LDDEPS)
$(CC) -o liblvm2cmd.so $(SOFLAG) $(CLDFLAGS) \ $(CC) -o liblvm2cmd.so $(SOFLAG) $(CLDFLAGS) \
$(CLDWHOLEARCHIVE) liblvm2cmd.a $(CLDNOWHOLEARCHIVE) $(CLDWHOLEARCHIVE) liblvm2cmd.a $(CLDNOWHOLEARCHIVE)