]> granicus.if.org Git - sudo/commitdiff
configure args on the command line should override builtin defaults.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Aug 2011 22:26:44 +0000 (18:26 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Aug 2011 22:26:44 +0000 (18:26 -0400)
Add -g to CFLAG for PIE builds.

--HG--
branch : 1.7

mkpkg

diff --git a/mkpkg b/mkpkg
index 86a65b99295740649d6ec226533ffde908a5649c..3563ca301c73fc309ae9827a05ef12c2b14bf037 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -124,14 +124,13 @@ case "$osversion" in
        if [ $osrelease -ge 50 ]; then
            # RHEL 5 and up build pies, have audit support and use a
            # separate PAM config file for "sudo -i".
-           export CFLAGS="-O2 $F_PIE" LDFLAGS="-pie"
+           export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie"
            configure_opts="${configure_opts}${configure_opts+$tab}--with-linux-audit"
            configure_opts="${configure_opts}${configure_opts+$tab}--with-pam-login"
            PPVARS="${PPVARS}${PPVARS+$space}linux_audit=1.4.0"
        fi
        # Note, must indent with tabs, not spaces due to IFS trickery
-       configure_opts="$configure_opts
-               --prefix=$prefix
+       configure_opts="--prefix=$prefix
                --with-logging=syslog
                --with-logfac=authpriv
                --with-pam
@@ -142,13 +141,14 @@ case "$osversion" in
                --with-tty-tickets
                --with-ldap
                --with-selinux
-               --with-passprompt=[sudo] password for %p: "
+               --with-passprompt=[sudo] password for %p: 
+               $configure_opts"
        ;;
     sles*)
        prefix=/usr
        if [ $osrelease -ge 10 ]; then
            # SLES 10 and higher build pies
-           export CFLAGS="-O2 $F_PIE" LDFLAGS="-pie"
+           export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie"
            if [ $osrelease -ge 11 ]; then
                # SLES 11 and higher has SELinux
                configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
@@ -162,8 +162,7 @@ case "$osversion" in
        esac
        # Note, must indent with tabs, not spaces due to IFS trickery
        # XXX - SuSE uses secure path but only for env_reset
-       configure_opts="$configure_opts
-               --prefix=$prefix
+       configure_opts="--prefix=$prefix
                --libexecdir=$prefix/$libexec/sudo
                --with-logging=syslog
                --with-logfac=auth
@@ -176,7 +175,8 @@ case "$osversion" in
                --enable-zlib=system
                --with-ldap
                --with-env-editor
-               --with-passprompt=%p\'s password: "
+               --with-passprompt=%p\'s password: 
+               $configure_opts"
 
        make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
        ;;
@@ -193,8 +193,7 @@ case "$osversion" in
            configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap
                --with-ldap-conf-file=/etc/sudo-ldap.conf"
        fi
-       configure_opts="$configure_opts
-               --prefix=/usr
+       configure_opts="--prefix=/usr
                --with-all-insults
                --with-exempt=sudo
                --with-pam
@@ -213,7 +212,8 @@ case "$osversion" in
                --with-sendmail=/usr/sbin/sendmail
                --mandir=/usr/share/man
                --libexecdir=/usr/lib/sudo
-               --with-secure-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
+               --with-secure-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
+               $configure_opts"
        ;;
     *)
        # For Solaris, add project support and use let configure choose zlib.
@@ -226,13 +226,13 @@ case "$osversion" in
            configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap"
        fi
        # Note, must indent with tabs, not spaces due to IFS trickery
-       configure_opts="$configure_opts
-               --prefix=$prefix
+       configure_opts="--prefix=$prefix
                --with-insults=disabled
                --with-logging=syslog
                --with-logfac=auth
                --with-editor=/usr/bin/vim:/usr/bin/vi:/bin/vi
-               --with-env-editor"
+               --with-env-editor
+               $configure_opts"
        ;;
 esac