mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
make -O2 optimisation flag configurable.
This commit is contained in:
parent
a0154cd9e7
commit
8ce0cbdaab
@ -1,5 +1,8 @@
|
|||||||
Version 2.00.19 -
|
Version 2.00.19 - 29 June 2004
|
||||||
==============================
|
==============================
|
||||||
|
Reduce severity of setlocale failure message.
|
||||||
|
Recognise argv[0] "initrd-lvm" (pld-linux).
|
||||||
|
Make -O2 configurable.
|
||||||
Added --disable-selinux to configure script.
|
Added --disable-selinux to configure script.
|
||||||
LD_FLAGS->LDFLAGS & LD_DEPS->LDDEPS in configure script.
|
LD_FLAGS->LDFLAGS & LD_DEPS->LDDEPS in configure script.
|
||||||
Add init_debug to clvmd.
|
Add init_debug to clvmd.
|
||||||
|
92
configure.in
92
configure.in
@ -18,29 +18,21 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
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 -- Get system type
|
||||||
AC_PROG_AWK
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_LN_S
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
AC_PROG_RANLIB
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
dnl Get system type
|
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux*)
|
linux*)
|
||||||
CFLAGS="$CFLAGS"
|
CFLAGS="$CFLAGS"
|
||||||
|
COPTIMISE_FLAG="-O2"
|
||||||
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
||||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||||
@ -54,6 +46,7 @@ case "$host_os" in
|
|||||||
FSADM=no ;;
|
FSADM=no ;;
|
||||||
darwin*)
|
darwin*)
|
||||||
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
|
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
|
||||||
|
COPTIMISE_FLAG="-O2"
|
||||||
CLDFLAGS="$CLDFLAGS"
|
CLDFLAGS="$CLDFLAGS"
|
||||||
CLDWHOLEARCHIVE="-all_load"
|
CLDWHOLEARCHIVE="-all_load"
|
||||||
CLDNOWHOLEARCHIVE=
|
CLDNOWHOLEARCHIVE=
|
||||||
@ -68,13 +61,22 @@ case "$host_os" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Checks for header files.
|
dnl -- Checks for programs.
|
||||||
|
AC_PROG_AWK
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
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
|
||||||
AC_TYPE_OFF_T
|
AC_TYPE_OFF_T
|
||||||
@ -84,7 +86,7 @@ AC_STRUCT_ST_RDEV
|
|||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
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)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -92,7 +94,7 @@ dnl -- Parallel make jobs?
|
|||||||
AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2)
|
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
|
echo $ac_n "Setting file owner to""... $ac_c" 1>&6
|
||||||
OWNER="root"
|
OWNER="root"
|
||||||
|
|
||||||
@ -106,7 +108,7 @@ if test x$OWNER != x; then
|
|||||||
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
|
echo $ac_n "Setting group owner to""... $ac_c" 1>&6
|
||||||
GROUP="root"
|
GROUP="root"
|
||||||
AC_ARG_WITH(group,
|
AC_ARG_WITH(group,
|
||||||
@ -234,14 +236,14 @@ if test x$MIRRORS = xinternal; then
|
|||||||
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
|
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
|
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
|
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)
|
||||||
@ -252,33 +254,46 @@ if test x$READLINE = xyes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Disable selinux
|
dnl -- Disable selinux
|
||||||
echo $ac_n "checking whether to enable selinux support""... $ac_c" 1>&6
|
echo $ac_n "checking whether to enable selinux support""... $ac_c" 1>&6
|
||||||
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support], \
|
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support], \
|
||||||
SELINUX=$enableval)
|
SELINUX=$enableval)
|
||||||
echo "$ac_t""$SELINUX" 1>&6
|
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
|
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
|
echo "$ac_t""$CLVMD" 1>&6
|
||||||
|
|
||||||
dnl If clvmd enabled and not cluster locking, automgically include the locking.
|
dnl -- If clvmd enabled without cluster locking, automagically include it
|
||||||
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
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Enable Debugging
|
dnl -- Enable debugging
|
||||||
echo $ac_n "checking whether to enable debugging""... $ac_c" 1>&6
|
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
|
||||||
|
|
||||||
|
dnl -- Normally turn off optimisation for debug builds
|
||||||
|
if test x$DEBUG = xyes; then
|
||||||
|
COPTIMISE_FLAG=
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Disable devmapper
|
dnl -- Override optimisation
|
||||||
|
echo $ac_n "checking for C optimisation flag""... $ac_c" 1>&6
|
||||||
|
AC_ARG_WITH(optimisation,
|
||||||
|
[ --with-optimisation=OPT C optimisation flag [OPT=-O2] ],
|
||||||
|
[ COPTIMISE_FLAG="$withval" ])
|
||||||
|
echo "$ac_t""$COPTIMISE_FLAG" 1>&6
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
dnl -- Disable devmapper
|
||||||
echo $ac_n "checking whether to use device-mapper""... $ac_c" 1>&6
|
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)
|
||||||
@ -289,7 +304,7 @@ if test x$DEVMAPPER = xyes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Disable O_DIRECT
|
dnl -- Disable O_DIRECT
|
||||||
echo $ac_n "checking whether to enable O_DIRECT""... $ac_c" 1>&6
|
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)
|
||||||
@ -300,7 +315,7 @@ if test x$ODIRECT = xyes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Enable cmdlib
|
dnl -- Enable cmdlib
|
||||||
echo $ac_n "checking whether to compile liblvm2cmd.so""... $ac_c" 1>&6
|
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)
|
||||||
@ -311,26 +326,26 @@ if test x$CMDLIB = xyes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Enable fsadm
|
dnl -- Enable fsadm
|
||||||
echo $ac_n "checking whether to build fsadm""... $ac_c" 1>&6
|
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, ,
|
||||||
AC_MSG_ERROR(
|
AC_MSG_ERROR(
|
||||||
@ -348,7 +363,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)
|
||||||
|
|
||||||
if [[ "x$HAVE_LIBDL" = xyes -a "x$STATIC_LINK" = xno ]]; then
|
if [[ "x$HAVE_LIBDL" = xyes -a "x$STATIC_LINK" = xno ]]; then
|
||||||
@ -359,7 +374,7 @@ else
|
|||||||
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 \
|
if [[ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \
|
||||||
-o "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 ]];
|
||||||
@ -370,7 +385,7 @@ Features cannot be 'shared' when building statically
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl Check for is_selinux_enabled
|
dnl -- Check for is_selinux_enabled
|
||||||
if test x$SELINUX = xyes; then
|
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)
|
||||||
|
|
||||||
@ -383,11 +398,11 @@ if test x$SELINUX = xyes; then
|
|||||||
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, ,
|
||||||
AC_MSG_ERROR(
|
AC_MSG_ERROR(
|
||||||
@ -405,8 +420,8 @@ package as well (which may be called readline-devel or something similar).
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
dnl -- Internationalisation stuff
|
||||||
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
|
|
||||||
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\
|
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],\
|
||||||
INTL=yes, INTL=no)
|
INTL=yes, INTL=no)
|
||||||
echo "$ac_t""$INTL" 1>&6
|
echo "$ac_t""$INTL" 1>&6
|
||||||
@ -456,6 +471,7 @@ AC_SUBST(MIRRORS)
|
|||||||
AC_SUBST(OWNER)
|
AC_SUBST(OWNER)
|
||||||
AC_SUBST(GROUP)
|
AC_SUBST(GROUP)
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
|
AC_SUBST(COPTIMISE_FLAG)
|
||||||
AC_SUBST(CLDFLAGS)
|
AC_SUBST(CLDFLAGS)
|
||||||
AC_SUBST(CLDWHOLEARCHIVE)
|
AC_SUBST(CLDWHOLEARCHIVE)
|
||||||
AC_SUBST(CLDNOWHOLEARCHIVE)
|
AC_SUBST(CLDNOWHOLEARCHIVE)
|
||||||
@ -481,8 +497,8 @@ 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( \
|
||||||
Makefile \
|
Makefile \
|
||||||
make.tmpl \
|
make.tmpl \
|
||||||
|
@ -61,11 +61,11 @@ CFLAGS += -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-pr
|
|||||||
|
|
||||||
#CFLAGS += -W -Wconversion -Wpointer-arith -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wmissing-noreturn
|
#CFLAGS += -W -Wconversion -Wpointer-arith -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wmissing-noreturn
|
||||||
|
|
||||||
|
CFLAGS += @COPTIMISE_FLAG@
|
||||||
|
|
||||||
ifeq ("@DEBUG@", "yes")
|
ifeq ("@DEBUG@", "yes")
|
||||||
CFLAGS += -g -fno-omit-frame-pointer -DDEBUG
|
CFLAGS += -g -fno-omit-frame-pointer -DDEBUG
|
||||||
CFLAGS += -DDEBUG_MEM
|
CFLAGS += -DDEBUG_MEM
|
||||||
else
|
|
||||||
CFLAGS += -O2
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ("@INTL@", "yes")
|
ifeq ("@INTL@", "yes")
|
||||||
|
Loading…
Reference in New Issue
Block a user