Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r2f8e3ca r9ae8f82  
    5252ssl=auto
    5353
     54pam=0
     55ldap=0
     56
    5457pie=1
    5558
    5659arch=$(uname -s)
    57 cpu=$(uname -m)
    5860
    5961GLIB_MIN_VERSION=2.16
     
    133135--purple=0/1    Disable/enable libpurple support        $purple
    134136                (automatically disables other protocol modules)
     137
     138--pam=0/1       Disable/enable PAM authentication       $pam
     139--ldap=0/1      Disable/enable LDAP authentication      $ldap
    135140
    136141--doc=0/1       Disable/enable help.txt generation      $doc
     
    194199
    195200TARGET=$target
    196 ARCH=$arch
    197 CPU=$cpu
    198201
    199202INSTALL=install -p
     
    242245#define PIDFILE "$pidfile"
    243246#define IPCSOCKET "$ipcsocket"
    244 #define ARCH "$arch"
    245 #define CPU "$cpu"
    246247EOF
    247248
     
    335336fi
    336337
    337 if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
     338if ! $PKG_CONFIG --version > /dev/null 2>/dev/null; then
     339        echo
     340        echo 'Cannot find pkg-config, aborting.'
     341        exit 1
     342fi
     343
     344if $PKG_CONFIG glib-2.0; then
    338345        if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then
    339346                cat<<EOF >>Makefile.settings
     
    628635done
    629636echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
     637
     638authobjs=
     639authlibs=
     640if [ "$pam" = 0 ]; then
     641        echo '#undef WITH_PAM' >> config.h
     642else
     643        if ! echo '#include <security/pam_appl.h>' | $CC -E - >/dev/null 2>/dev/null; then
     644                echo 'Cannot find libpam development libraries, aborting. (Install libpam0g-dev?)'
     645                exit 1
     646        fi
     647        echo '#define WITH_PAM' >> config.h
     648        authobjs=$authobjs'auth_pam.o '
     649        authlibs=$authlibs'-lpam '
     650fi
     651if [ "$ldap" = 0 ]; then
     652        echo '#undef WITH_LDAP' >> config.h
     653else
     654        if ! echo '#include <ldap.h>' | $CC -E - >/dev/null 2>/dev/null; then
     655                echo 'Cannot find libldap development libraries, aborting. (Install libldap2-dev?)'
     656                exit 1
     657        fi
     658        echo '#define WITH_LDAP' >> config.h
     659        authobjs=$authobjs'auth_ldap.o '
     660        authlibs=$authlibs'-lldap '
     661fi
     662echo AUTH_OBJS=$authobjs >> Makefile.settings
     663echo EFLAGS+=$authlibs >> Makefile.settings
    630664
    631665if [ "$strip" = 0 ]; then
Note: See TracChangeset for help on using the changeset viewer.