|
|
| version 1.1.1.2, 2012/05/29 12:26:49 | version 1.1.1.3, 2012/10/09 09:29:52 |
|---|---|
| Line 78 top_srcdir=`dirname $0` | Line 78 top_srcdir=`dirname $0` |
| test -n "$osversion" || exit 1 | test -n "$osversion" || exit 1 |
| osrelease=`echo "$osversion" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'` | osrelease=`echo "$osversion" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'` |
| # Default paths | |
| prefix=/usr/local | |
| # Linux distros may build binaries as pie files. | |
| # This is really something libtool should figure out, but it does not. | |
| case "$osversion" in | |
| *-s390*|*-sparc*|*-alpha*) | |
| F_PIE=-fPIE | |
| ;; | |
| *) | |
| F_PIE=-fpie | |
| ;; | |
| esac | |
| # Choose compiler options by osversion if not cross-compiling. | # Choose compiler options by osversion if not cross-compiling. |
| if [ "$crossbuild" = "false" ]; then | if [ "$crossbuild" = "false" ]; then |
| case "$osversion" in | case "$osversion" in |
| Line 120 fi | Line 106 fi |
| # We use the same configure options as vendor packages when possible. | # We use the same configure options as vendor packages when possible. |
| case "$osversion" in | case "$osversion" in |
| centos*|rhel*) | centos*|rhel*) |
| prefix=/usr | |
| if [ $osrelease -ge 40 ]; then | if [ $osrelease -ge 40 ]; then |
| # RHEL 4 and up support SELinux | # RHEL 4 and up support SELinux |
| configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux" | configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux" |
| fi | fi |
| if [ $osrelease -ge 50 ]; then | if [ $osrelease -ge 50 ]; then |
| # RHEL 5 and up build pies, have audit support and use a | # RHEL 5 and up has audit support and uses a separate PAM |
| # separate PAM config file for "sudo -i". | # config file for "sudo -i". |
| 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-linux-audit" |
| configure_opts="${configure_opts}${configure_opts+$tab}--with-pam-login" | configure_opts="${configure_opts}${configure_opts+$tab}--with-pam-login" |
| PPVARS="${PPVARS}${PPVARS+$space}linux_audit=1.4.0" | PPVARS="${PPVARS}${PPVARS+$space}linux_audit=1.4.0" |
| fi | fi |
| # Note, must indent with tabs, not spaces due to IFS trickery | # Note, must indent with tabs, not spaces due to IFS trickery |
| configure_opts="--prefix=$prefix | configure_opts="--prefix=/usr |
| --with-logging=syslog | --with-logging=syslog |
| --with-logfac=authpriv | --with-logfac=authpriv |
| --with-pam | --with-pam |
| Line 148 case "$osversion" in | Line 132 case "$osversion" in |
| $configure_opts" | $configure_opts" |
| ;; | ;; |
| sles*) | sles*) |
| prefix=/usr | |
| if [ $osrelease -ge 10 ]; then | if [ $osrelease -ge 10 ]; then |
| # SLES 10 and higher build pies | # SLES 11 and higher has SELinux |
| export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie" | |
| if [ $osrelease -ge 11 ]; then | if [ $osrelease -ge 11 ]; then |
| # SLES 11 and higher has SELinux | |
| configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux" | configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux" |
| fi | fi |
| fi | fi |
| Line 165 case "$osversion" in | Line 146 case "$osversion" in |
| esac | esac |
| # Note, must indent with tabs, not spaces due to IFS trickery | # Note, must indent with tabs, not spaces due to IFS trickery |
| # XXX - SuSE uses secure path but only for env_reset | # XXX - SuSE uses secure path but only for env_reset |
| configure_opts="--prefix=$prefix | configure_opts="--prefix=/usr |
| --libexecdir=$prefix/$libexec/sudo | --libexecdir=/usr/$libexec/sudo |
| --with-logging=syslog | --with-logging=syslog |
| --with-logfac=auth | --with-logfac=auth |
| --with-all-insults | --with-all-insults |
| Line 184 case "$osversion" in | Line 165 case "$osversion" in |
| make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)' | make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)' |
| ;; | ;; |
| deb*|ubu*) | deb*|ubu*) |
| prefix=/usr | # Man pages should be compressed in .deb files |
| export MANCOMPRESS='gzip -9' | |
| export MANCOMPRESSEXT='.gz' | |
| # If Ubuntu, add --enable-admin-flag | # If Ubuntu, add --enable-admin-flag |
| case "$osversion" in | case "$osversion" in |
| ubu*) | ubu*) |
| configure_opts="${configure_opts}${configure_opts+$tab}--enable-admin-flag${tab}--without-lecture" | configure_opts="${configure_opts}${configure_opts+$tab}--enable-admin-flag${tab}--without-lecture" |
| if [ $osrelease -ge 1004 ]; then | |
| export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie" | |
| fi | |
| ;; | ;; |
| deb*) | |
| if [ $osrelease -ge 600 ]; then | |
| export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie" | |
| fi | |
| ;; | |
| esac | esac |
| # Note, must indent with tabs, not spaces due to IFS trickery | # Note, must indent with tabs, not spaces due to IFS trickery |
| if test "$flavor" = "ldap"; then | if test "$flavor" = "ldap"; then |
| configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap | configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap |
| --with-ldap-conf-file=/etc/sudo-ldap.conf" | --with-ldap-conf-file=/etc/sudo-ldap.conf" |
| fi | fi |
| configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux" | |
| configure_opts="--prefix=/usr | configure_opts="--prefix=/usr |
| --with-all-insults | --with-all-insults |
| --with-pam | --with-pam |
| Line 238 case "$osversion" in | Line 214 case "$osversion" in |
| fi | fi |
| export CFLAGS="-O2 -g $ARCH_FLAGS $SDK_FLAGS" | export CFLAGS="-O2 -g $ARCH_FLAGS $SDK_FLAGS" |
| export LDFLAGS="$ARCH_FLAGS $SDK_FLAGS" | export LDFLAGS="$ARCH_FLAGS $SDK_FLAGS" |
| if [ $osrelease -ge 105 ]; then | |
| CFLAGS="$CFLAGS $F_PIE" | |
| LDFLAGS="$LDFLAGS -Wl,-pie" | |
| fi | |
| # Note, must indent with tabs, not spaces due to IFS trickery | # Note, must indent with tabs, not spaces due to IFS trickery |
| configure_opts="--prefix=$prefix | configure_opts="--with-pam |
| --with-pam | |
| --without-tty-tickets | --without-tty-tickets |
| --enable-zlib=system | --enable-zlib=system |
| --with-ldap | --with-ldap |
| Line 255 case "$osversion" in | Line 226 case "$osversion" in |
| --with-env-editor | --with-env-editor |
| $configure_opts" | $configure_opts" |
| ;; | ;; |
| aix*) | |
| # Note, must indent with tabs, not spaces due to IFS trickery | |
| # Note: we include our own zlib instead of relying on the | |
| # AIX freeware version being installed. | |
| configure_opts=" | |
| --prefix=/opt/freeware | |
| --mandir=/opt/freeware/man | |
| --with-insults=disabled | |
| --with-logging=syslog | |
| --with-logfac=auth | |
| --with-editor=/usr/bin/vi | |
| --with-env-editor | |
| --enable-zlib=builtin | |
| --disable-nls | |
| $configure_opts" | |
| PPVARS="${PPVARS}${PPVARS+$space}aix_freeware=true" | |
| ;; | |
| *) | *) |
| # For Solaris, add project support and use let configure choose zlib. | # For Solaris, add project support and use let configure choose zlib. |
| # For all others, use the builtin zlib and disable NLS support. | # For all others, use the builtin zlib and disable NLS support. |
| Line 266 case "$osversion" in | Line 254 case "$osversion" in |
| configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap" | configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap" |
| fi | fi |
| # Note, must indent with tabs, not spaces due to IFS trickery | # Note, must indent with tabs, not spaces due to IFS trickery |
| configure_opts="--prefix=$prefix | configure_opts=" |
| --with-insults=disabled | --with-insults=disabled |
| --with-logging=syslog | --with-logging=syslog |
| --with-logfac=auth | --with-logfac=auth |