[m4] autoconf script maken

Pagina: 1
Acties:

  • Sjonny
  • Registratie: Maart 2001
  • Laatst online: 14:33
Ok, ik probeer dus een scripje te maken, maar dat wil niet echt. wat ik tot nu toe heb:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
dnl detect sensors library path
AC_DEFUN([AM_PATH_SENSORS],
[
    AC_MSG_CHECKING(location of libsensors)
    /sbin/ldconfig -p | grep -w libsensors.so. &>/dev/null
    if test $? -eq 0; then

     SENSORS_LIB=$(/sbin/ldconfig -p | grep -w libsensors.so. | awk {'print $4'})
     SENSORS_LIB_PATH=`dirname $SENSORS_LIB`
     SENSORS_BASE_PATH=`dirname $SENSORS_LIB_PATH`

     SENSORS_CFLAGS="-I$SENSORS_BASE_PATH/include/sensors"
     SENSORS_LIBS="-L$SENSORS_BASE_PATH/lib -lsensors"
     AC_SUBST(SENSORS_CFLAGS)
     AC_SUBST(SENSORS_LIBS)
     AC_MSG_RESULT([$SENSORS_BASE_PATH])
    else
     AC_MSG_ERROR([can't find libsensors])
    fi
])

die drie lijntjes waar die het path moet fetchen werken niet. als ik dit in een bash scriptje doe, werkt het perfect, maar in die .m4 om me configure script te maken gaat dan ook nog wel goed, maar configure zelf bakt er weer nix van.

kortom, ik snap er dus ook nix meer van. vanalles geprobeert met `` quotes en $() meuk, maar nix fixed het. iemand nog leuke probeersels?

The problem is in the part of your brain that handles intelligence.