[Samba] Disable optimization

Gerald (Jerry) Carter jerry at samba.org
Fri Aug 8 06:11:15 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 7 Aug 2003, Matt Seitz wrote:

> I would like to build Samba with optimizations disabled (easier to step 
> through the code in a debugger).  Is there an option I can pass to 
> "./configure", or must I edit the resulting makefile by hand?

Here's my script for building 3.0:

#!/bin/sh

umask 022

## Build options
CONFIGUREOPT="--enable-debug --enable-developer --with-pam
- --with-static-modules --with-libsmbclient=no"
export CONFIGUREOPT

./autogen.sh

case "$1" in
        dmalloc)
                env CFLAGS="-Wall" ./configure \
                        --enable-dmalloc \
                        $CONFIGUREOPT
                ;;
        insure)
                env CFLAGS="-g" CC="insure" ./configure \
                        $CONFIGUREOPT
                ;;
        ccache)
                env CFLAGS="-Wall" CC="ccache gcc" ./configure \
                        $CONFIGUREOPT
                ;;
        *)
                env CFLAGS="-Wall" ./configure \
                        $CONFIGUREOPT
                ;;
esac

## disable optimization
sed 's/-O //g' Makefile | sed 's/-O2 //g' > Makefile.new; \
      /bin/mv -f Makefile.new Makefile

## build
make proto
make all


> 
> 

- -- 
 ----------------------------------------------------------------------
 Hewlett-Packard            ------------------------- http://www.hp.com
 SAMBA Team                 ---------------------- http://www.samba.org
 GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
 "You can never go home again, Oatman, but I guess you can shop there."  
                            --John Cusack - "Grosse Point Blank" (1997)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE/Mz8DIR7qMdg1EfYRAm/XAJ9Bj7khFkldUnXgFR2kgyUkYk0rFACgtwmQ
1gjjsccOcRpfo9hHD5noe98=
=XI2p
-----END PGP SIGNATURE-----




More information about the samba mailing list