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.
|
||||
LD_FLAGS->LDFLAGS & LD_DEPS->LDDEPS in configure script.
|
||||
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)
|
||||
|
||||
################################################################################
|
||||
dnl setup the directory where autoconf has auxilary files
|
||||
dnl -- setup the directory where autoconf has auxilary files
|
||||
AC_CONFIG_AUX_DIR(autoconf)
|
||||
|
||||
################################################################################
|
||||
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 Get system type
|
||||
dnl -- Get system type
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
CFLAGS="$CFLAGS"
|
||||
COPTIMISE_FLAG="-O2"
|
||||
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||
@ -54,6 +46,7 @@ case "$host_os" in
|
||||
FSADM=no ;;
|
||||
darwin*)
|
||||
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
|
||||
COPTIMISE_FLAG="-O2"
|
||||
CLDFLAGS="$CLDFLAGS"
|
||||
CLDWHOLEARCHIVE="-all_load"
|
||||
CLDNOWHOLEARCHIVE=
|
||||
@ -68,13 +61,22 @@ case "$host_os" in
|
||||
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_STDC
|
||||
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_INLINE
|
||||
AC_TYPE_OFF_T
|
||||
@ -84,7 +86,7 @@ AC_STRUCT_ST_RDEV
|
||||
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)
|
||||
|
||||
################################################################################
|
||||
@ -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)
|
||||
|
||||
################################################################################
|
||||
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"
|
||||
|
||||
@ -106,7 +108,7 @@ if test x$OWNER != x; then
|
||||
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,
|
||||
@ -234,14 +236,14 @@ if test x$MIRRORS = xinternal; then
|
||||
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
|
||||
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], \
|
||||
READLINE=$enableval, READLINE=no)
|
||||
@ -252,33 +254,46 @@ if test x$READLINE = xyes; then
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
dnl Disable selinux
|
||||
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], \
|
||||
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 without cluster locking, automagically include it
|
||||
if test x$CLVMD = xyes && test x$CLUSTER = xnone; then
|
||||
CLUSTER=internal
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
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], \
|
||||
DEBUG=yes, DEBUG=no)
|
||||
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
|
||||
AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \
|
||||
DEVMAPPER=no)
|
||||
@ -289,7 +304,7 @@ if test x$DEVMAPPER = xyes; then
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
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], \
|
||||
ODIRECT=no)
|
||||
@ -300,7 +315,7 @@ if test x$ODIRECT = xyes; then
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
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], \
|
||||
CMDLIB=yes, CMDLIB=no)
|
||||
@ -311,26 +326,26 @@ if test x$CMDLIB = xyes; then
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
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)
|
||||
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 ]];
|
||||
then exec_prefix="";
|
||||
fi;
|
||||
|
||||
################################################################################
|
||||
dnl Checks for library functions.
|
||||
dnl -- Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_VPRINTF
|
||||
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
|
||||
AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, ,
|
||||
AC_MSG_ERROR(
|
||||
@ -348,7 +363,7 @@ Note: (n)curses also seems to work as a substitute for termcap. This was
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
dnl Check for dlopen
|
||||
dnl -- Check for dlopen
|
||||
AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
|
||||
|
||||
if [[ "x$HAVE_LIBDL" = xyes -a "x$STATIC_LINK" = xno ]]; then
|
||||
@ -359,7 +374,7 @@ else
|
||||
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 "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \
|
||||
\) -a "x$STATIC_LINK" = xyes ]];
|
||||
@ -370,7 +385,7 @@ Features cannot be 'shared' when building statically
|
||||
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)
|
||||
|
||||
@ -383,11 +398,11 @@ if test x$SELINUX = xyes; then
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
dnl Check for getopt
|
||||
dnl -- Check for getopt
|
||||
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
|
||||
AC_CHECK_LIB(readline, readline, ,
|
||||
AC_MSG_ERROR(
|
||||
@ -405,8 +420,8 @@ package as well (which may be called readline-devel or something similar).
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
dnl -- Internationalisation stuff
|
||||
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],\
|
||||
INTL=yes, INTL=no)
|
||||
echo "$ac_t""$INTL" 1>&6
|
||||
@ -456,6 +471,7 @@ AC_SUBST(MIRRORS)
|
||||
AC_SUBST(OWNER)
|
||||
AC_SUBST(GROUP)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(COPTIMISE_FLAG)
|
||||
AC_SUBST(CLDFLAGS)
|
||||
AC_SUBST(CLDWHOLEARCHIVE)
|
||||
AC_SUBST(CLDNOWHOLEARCHIVE)
|
||||
@ -481,8 +497,8 @@ AC_SUBST(CLUSTER)
|
||||
AC_SUBST(FSADM)
|
||||
|
||||
################################################################################
|
||||
dnl First and last lines should not contain files to generate in order to
|
||||
dnl keep utility scripts running properly
|
||||
dnl -- First and last lines should not contain files to generate in order to
|
||||
dnl -- keep utility scripts running properly
|
||||
AC_OUTPUT( \
|
||||
Makefile \
|
||||
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 += @COPTIMISE_FLAG@
|
||||
|
||||
ifeq ("@DEBUG@", "yes")
|
||||
CFLAGS += -g -fno-omit-frame-pointer -DDEBUG
|
||||
CFLAGS += -DDEBUG_MEM
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
ifeq ("@INTL@", "yes")
|
||||
|
Loading…
Reference in New Issue
Block a user