Le 15/09/04 à 23:30, [EMAIL PROTECTED] écrivait:

> 
> Quelques modifs auxquels j'ai pensé.
> 
> 1/
> Remplacer partout les if($DISTRIB ==...
> par des constructions de la forme case $DISTRIB...
> C'est plus facile à manier quand on veut ajouter une nouvelle distribution
Quelque chose comme cela peut-être:

# ===== check distribution =====
SIMPLE=0
if   test -f /etc/mandrake-release ; then
        # Mandrake Linux release xx.y  with xx.y in 9.1 9.2 10.0 10
        DISTRIB="Mandrake"
        DISTVER=`cat /etc/mandrake-release  | perl -ne 'print $1 if 
(s!^.*release[^\d]*(\d+(\.\d+)?).*!is)'`
elif test -f /etc/fedora-release ; then
        # Fedora Core release x with x in 1 2. Take care: Fedora has also 
/etc/redhat-release
        DISTRIB="Fedora"
        DISTVER=`cat /etc/fedora-release    | perl -ne 'print $1 if 
(s!^.*release[^\d]*(\d+(\.\d+)?).*!is)'`
elif test -f /etc/redhat-release ; then
        # Red Hat Linux release 9 (Shrike)
        DISTRIB="Redhat"
        DISTVER=`cat /etc/redhat-release    | perl -ne 'print $1 if 
(s!^.*release[^\d]*(\d+(\.\d+)?).*!is)'`
elif test -f /etc/slackware-version ; then
        # Slackware x.y.z with x.y.z in 9.1.0 10.0.0
        DISTRIB="Slackware"
        DISTVER=`cat /etc/slackware-version | perl -ne 'print $1 if 
(s!^slackware[^\d]*(\d+(\.\d+)?).*!is)'`
elif test -f /etc/SuSE-release ; then
        # SuSe Linux x.y with x.y in 9.0 9.1
        DISTRIB="Suse"
        DISTVER=`cat /etc/SuSE-version      |  perl -ne 'print $1 if 
(s!^suse[^\d]*(\d+(\.\d+)?).*!is)'`
elif test -f /etc/debian_version ; then
        # 3.0 3.1
        DISTRIB="Debian"
        DISTVER=`cat /etc/debian_version`
else
        DISTRIB="generic"
        DISTVER=0
fi


Autre suggestion pour dsp-dir:

# ===== arg: dsp-dir =====
AC_ARG_WITH(dsp-dir,
        [  --with-dsp-dir             Path to DSP files (default={datadir})],
        DSPDIR=${withval},
        DSPDIR=""
        )
# if test -z "${DSPDIR}" ; then
#       DSPDIR=${CONFDIR}/eagle-usb/dsp
# fi
[ -z "${DSPDIR}" ] && DSPDIR=${datadir}/eagle-usb

Sur Debian, dans la doc http://localhost/doc/autoconf/autoconf.html, ${datadir} 
semble un dossier plus approprié:
datadir
  The directory for installing read-only architecture-independent data.

Bye
Jean-Pierre

Reply via email to