From: Sam S. <sd...@gn...> - 2007-12-17 01:36:50
|
> * Reini Urban <eh...@k-...> [2007-12-16 19:57:23 -0500]: > > Maybe I'll add a --install-modules=all|auto|base flag to configure. > Adding all the modules by hand gets me sick, I often forgot some of the > new ones when packaging. I use this bash function: mkcli () { unset mycc; if [ -z "$1" ]; then echo "usage: ${FUNCNAME} build-dir" 2>&1; return 1; fi; MODS="libsvm rawsock"; cd ../../top; ffcall=`pwd`; cd -; CFG="./configure --build --fsstnd=redhat CFLAGS='' --with-libffcall-prefix=${ffcall}"; case "$1" in build*) dir=$1 ;; *) dir=build-$1 ;; esac; case ${dir} in *-g-* | *-g) CFG=${CFG}' --with-debug'; DEBUG=true ;; esac; case ${dir} in *-gxx*) mycc=g++ ;; esac; case ${dir} in *-m64*) mycc=${mycc-gcc}' -m64'; SUFFIX=/m64 ;; esac; case ${dir} in *-m32*) mycc=${mycc-gcc}' -m32'; SUFFIX=/m32 ;; esac; case ${dir} in *-dynmod) CFG=${CFG}' --with-dynamic-modules' ;; esac; case `uname` in Linux) MODS=${MODS}' bindings/glibc' ;; CYGWIN*) MODS=${MODS}' dirkey bindings/win32'; SIGSEGV=cygwin; test -z "$DEBUG" && NOX=true ;; SunOS) for e in readline sigsegv iconv; do CFG=${CFG}" --with-lib${e}-prefix=${HOME}/src/sun4${SUFFIX}"; done ;; esac; case ${dir} in *-mingw*) CFG=${CFG}' --with-mingw'; SIGSEGV=mingw ;; *) test -f /usr/include/db.h && MODS=${MODS}' berkeley-db'; test -f /usr/include/zlib.h && MODS=${MODS}' zlib'; test -d /usr/include/pcre/ -o -f /usr/include/pcre.h && MODS=${MODS}' pcre'; test -d /usr/include/gdbm/ -o -f /usr/include/gdbm.h && MODS=${MODS}' gdbm'; test -d /usr/include/X11/ -a -z "$NOX" && MODS=${MODS}' clx/new-clx'; if test -d /usr/local/include/pari/; then MODS=${MODS}' pari'; CFG=${CFG}' --with-libpari-prefix=/usr/local'; fi; test -d /usr/include/X11/gtk-2* && MODS=${MODS}' gtk2' ;; esac; if test -f c:/progra~1/postgresql/*/include/postgres_ext.h; then MODS=${MODS}' postgresql'; CFG=${CFG}" --with-libpq-prefix=c:/progra~1/postgresql/*"; else if test -f /usr/local/include/postgres_ext.h; then MODS=${MODS}' postgresql'; CFG=${CFG}" --with-libpq-prefix=/usr/local"; else if test -f /usr/include/postgres_ext.h; then MODS=${MODS}' postgresql'; fi; fi; fi; test -z "${SIGSEGV}" || CFG=${CFG}' --with-libsigsegv-prefix=/usr/local/libsigsegv-'${SIGSEGV}; /bin/rm -rf ${dir}; if test -L build; then rm -i -fv build; fi; ln -sv ${dir} build; export CONFIG_SHELL=/bin/sh; for m in ${MODS}; do CFG=${CFG}" --with-module=$m"; done; test -z "${mycc}" || CFG=${CFG}" CC='${mycc}'"; echo "${CFG} ${dir}"; ${CFG} ${dir} } do you have in mind something like that? I am not sure this will be useful to many people. -- Sam Steingold (http://sds.podval.org/) on Fedora release 8 (Werewolf) http://truepeace.org http://palestinefacts.org http://thereligionofpeace.com http://iris.org.il Live free or die. |