Autoconf vindt M4 macro niet

Pagina: 1
Acties:

  • mithras
  • Registratie: Maart 2003
  • Niet online
Heeft iemand een idee hoe ik dit autogen probleempje kan oplossen? Ik probeer de laatste Awn van svn te compileren. Hiervoor had ik eerst glib-gettext nodig. Na deze ook handmatig gecompiled te hebben wordt de library wel gevonden, maar gaat het daarna toch fout:
jurian@karlijn:~/Desktop/avant-window-navigator$ ./autogen.sh 
/usr/bin/gnome-autogen.sh

checking for autoconf >= 2.53...

  testing autoconf2.50... 
not found.
  testing autoconf... 
found 2.61

checking for automake >= 1.9...

  testing automake-1.10... 
found 1.10

checking for glib-gettext >= 2.2.0...

  testing glib-gettextize... 
found 2.2.2

[...]

Checking for required M4 macros...

  glib-gettext.m4 not found
***Error***: some autoconf macros required to build avant-panel-menu
  were not found in your aclocal path, or some forbidden
  macros were found.  Perhaps you need to adjust your
  ACLOCAL_FLAGS?

jurian@karlijn:~/Desktop/avant-window-navigator$ locate glib-gettext|grep aclocal
/usr/local/share/aclocal/glib-gettext.m4
jurian@karlijn:~/Desktop/avant-window-navigator$ 
glib-gettext.m4 bestaat dus ook en staat in een map waar ik vanuit ga dat aclocal wel zoekt (omdat het /usr/local/share/aclocal/ is). Ik heb automake1.10 geinstalleerd (1.9 is standaard voor Ubuntu Feisty), maar dat mocht niet baten. Enig idee hoe automake glib-gettext.m4 wel kan vinden?

  • Ivo
  • Registratie: Juni 2001
  • Laatst online: 14-01-2025

Ivo

Je kan de source van autogen.sh eens bekijken of de relevante delen hier posten. Misschien moet je ACLOCAL_FLAGS een waarde voeren vantevoren.

[ Voor 27% gewijzigd door Ivo op 27-06-2007 19:29 ]


  • mithras
  • Registratie: Maart 2003
  • Niet online
Autogen.sh is niet heel interessant:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

PKG_NAME="avant-panel-menu"

(test -f $srcdir/configure.in \
  && test -f $srcdir/autogen.sh) || {
    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
    echo " top-level $PKG_NAME directory"
    exit 1
}

DIE=0

rm -f .using-gnome-libs-package

if ! which gnome-autogen.sh ; then
  echo "You need to install the gnome-common module and make"
  echo "sure the gnome-autogen.sh script is in your \$PATH."
  exit 1
fi

REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh
Maar dan een configure.in waar ik niet veel van snap (maar wel aclocal in voor komt):
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
AC_INIT([avant-window-navigator], [0.1.1], [])i

AC_CONFIG_SRCDIR([.])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE([tar-ustar])
AM_MAINTAINER_MODE

AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"])

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LIBTOOL

dnl CFLAGS
CFLAGS="$CFLAGS -Wall -fno-strict-aliasing -fmessage-length=0 -D_FORTIFY_SOURCE=2"

dnl ==============================================
dnl gconf stuff
dnl ==============================================
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi

dnl ==============================================
dnl translation support
dnl ==============================================

GETTEXT_PACKAGE=avant-window-navigator
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
ALL_LINGUAS="cs da de_DE el_GR en_GB es fi_FI fr_FR it_IT no_NO pt_BR sv ru"

IT_PROG_INTLTOOL([0.34])
AM_GLIB_GNU_GETTEXT

slicelocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(slicelocaledir)

dnl ==============================================
dnl Check that we meet the  dependencies
dnl ==============================================
AM_PATH_GLIB_2_0(2.8.0,,,gobject)

COMMON_MODULES="glib-2.0 gobject-2.0 gtk+-2.0 gdk-2.0"

PKG_CHECK_MODULES(AWN, [ $COMMON_MODULES libwnck-1.0 gnome-desktop-2.0 libgnome-2.0 gnome-vfs-2.0 gconf-2.0 x11 xproto dbus-glib-1 libglade-2.0 xdamage xcomposite xrender])
AC_SUBST(AWN_CFLAGS)
AC_SUBST(AWN_LIBS)

dnl ==============================================
dnl DBUS
dnl ==============================================

DBUS_GLIB_BIN="`$PKG_CONFIG --variable=exec_prefix dbus-glib-1`/bin"
AC_SUBST(DBUS_GLIB_BIN)

dnl ==============================================
dnl GConf
dnl ==============================================
AM_GCONF_SOURCE_2

AC_OUTPUT([
Makefile
avant-preferences/Makefile
avant-launchers/Makefile
avant-applets/Makefile
libawn/Makefile
src/Makefile
awn-applet-activation/Makefile
applets/Makefile
applets/separator/Makefile
applets/switcher/Makefile
applets/trash/Makefile
applets/notification-area/Makefile
data/Makefile
data/active/Makefile
po/Makefile.in
awn.pc
])
Verder helpt het exporteren van de ACLOCAL_FLAGS niet heel erg als je niet weet wat je eraan moet toevoegen. Sterker nog, op het moment is de variabele gewoon leeg. Ik weet niet of tijdens het uitvoeren tijdelijk wat flags gezet worden, zo sterk ben ik namelijk niet in deze taaltjes :p

Verwijderd

mithras schreef op woensdag 27 juni 2007 @ 18:59:
glib-gettext.m4 bestaat dus ook en staat in een map waar ik vanuit ga dat aclocal wel zoekt (omdat het /usr/local/share/aclocal/ is). Ik heb automake1.10 geinstalleerd (1.9 is standaard voor Ubuntu Feisty), maar dat mocht niet baten. Enig idee hoe automake glib-gettext.m4 wel kan vinden?
En hierom moet je altijd van packages installeren. Aclocal zoekt in $prefix/share/aclocal en $prefix/share/aclocal-$version. Jouw aclocal $prefix (zie $(which aclocal)) is hoogstwaarschijnlijk /usr, niet /usr/local. Packages installeren in /usr. Source-installs in /usr/local. Om dit soort onzin, samen met versie-trammelant en dergelijke te voorkomen, is het veel makkelijker om packages te gebruiken waar beschikbaar, zodat ze in de standaard prefix terecht komen. Lukt dat echt niet, dan moet je een eigen source-prefix gaan opzetten (default /usr/local; zet deze nooit maar dan ook nooit naar /usr tenzij je je hele install naar de kloten wilt helpen) en source-installs daarvan op de hoogte brengen:

code:
1
2
3
4
5
6
7
8
9
10
11
export src_prefix=/usr/local
export ACLOCAL_FLAGS="-I ${src_prefix}/share/aclocal"
export PKG_CONFIG_PATH="${src_prefix}/lib/pkgconfig"
if [ test x$PATH = x ]; then
  export PATH="${src_prefix}/bin"
else
  export PATH="$PATH:${src_prefix}/bin"
fi
export CFLAGS="-I${src_prefix}/include"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L${src_prefix}/lib"


en dan elke keer dat je een source package installeert (nogmaals, de default is /usr/local dus als je als src_prefix /usr/local gebruikt hoef je dit niet expliciet te doen):

code:
1
./configure --prefix=${src_prefix}


Dit zou het grootste gedeelte van de problemen op moeten lossen, althans, op deze manier kan ik in welke src_prefix dan ook redelijk makkelijk GNOME compileren, dus andere packages zouden ook zonder problemen moeten werken. Als je wilt weten wat elk van de bovenstaande variabelen betekent zul je zelf een en ander Google-werk moeten zoeken, maar zo heb je in elk geval iets om het werkend te krijgen.