configure

branch
webdav
changeset 250
f4d93355b054
parent 210
21274e5950af
child 260
4779a6fb4fbe
equal deleted inserted replaced
249:3b302093945c 250:f4d93355b054
55 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 55 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
56 --infodir=DIR info documentation [DATAROOTDIR/info] 56 --infodir=DIR info documentation [DATAROOTDIR/info]
57 --mandir=DIR man documentation [DATAROOTDIR/man] 57 --mandir=DIR man documentation [DATAROOTDIR/man]
58 58
59 Optional Features: 59 Optional Features:
60 --enable-pg 60 --enable-postgresql
61 61
62 __EOF__ 62 __EOF__
63 } 63 }
64 64
65 # 65 #
94 elif [[ $ARG = --mandir=* ]]; then 94 elif [[ $ARG = --mandir=* ]]; then
95 MANDIR=${ARG:9} 95 MANDIR=${ARG:9}
96 elif [ $ARG = "--help" ]; then 96 elif [ $ARG = "--help" ]; then
97 printhelp 97 printhelp
98 exit 0 98 exit 0
99 elif [[ $ARG == --enable-pg ]]; then 99 elif [[ $ARG == --enable-postgresql ]]; then
100 FEATURE_PG=on 100 FEATURE_POSTGRESQL=on
101 elif [[ $ARG == --disable-pg ]]; then 101 elif [[ $ARG == --disable-postgresql ]]; then
102 unset FEATURE_PG 102 unset FEATURE_POSTGRESQL
103 fi 103 fi
104 done 104 done
105 105
106 # set dir variables 106 # set dir variables
107 if [ -z "$BINDIR" ]; then 107 if [ -z "$BINDIR" ]; then
263 if [ $? -ne 0 ] ; then 263 if [ $? -ne 0 ] ; then
264 break 264 break
265 fi 265 fi
266 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags libpq`" 266 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags libpq`"
267 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs libpq`" 267 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs libpq`"
268 CFLAGS="$CFLAGS -DENABLE_POSTGRESQL"
268 echo yes 269 echo yes
269 return 0 270 return 0
270 done 271 done
271 272
272 echo no 273 echo no
467 if [ $? -ne 0 ]; then 468 if [ $? -ne 0 ]; then
468 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " 469 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl "
469 ERROR=1 470 ERROR=1
470 fi 471 fi
471 472
473 # Features
474 if [ ! -z "$FEATURE_POSTGRESQL" ]; then
475 # check dependency
476 dependency_libpq
477 if [ $? -ne 0 ]; then
478 # "auto" features can fail and are just disabled in this case
479 if [ $FEATURE_POSTGRESQL != "auto" ]; then
480 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
481 ERROR=1
482 fi
483 fi
484 fi
485
472 486
473 echo >> $TEMP_DIR/config.mk 487 echo >> $TEMP_DIR/config.mk
474 if [ ! -z "${CFLAGS}" ]; then 488 if [ ! -z "${CFLAGS}" ]; then
475 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk 489 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
476 fi 490 fi

mercurial