Errors when compile addons

Hi,
I’ve spent all day trying to solve that issue: I’ve got the following logs when I try to compile the addons. looks like the path to the missing files is false but I don’t know how to change it and even if it’s a really good idea to do so.
I though, thoses issues were not any problems for some of yours.
Thank you
Louis

PS: make runs without errors.

make install
make[1]: Entering directory /usr/src/asterisk-addons-1.4.0/menuselect' checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for GNU make... make checking for asprintf... yes checking for getloadavg... yes checking for setenv... yes checking for strcasestr... yes checking for strndup... yes checking for strnlen... yes checking for strsep... yes checking for strtoq... yes checking for unsetenv... yes checking for vasprintf... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for initscr in -lcurses... yes checking curses.h usability... yes checking curses.h presence... yes checking for curses.h... yes checking for initscr in -lncurses... yes checking for curses.h... (cached) yes configure: creating ./config.status config.status: creating makeopts config.status: creating autoconfig.h === configuring in mxml (/usr/src/asterisk-addons-1.4.0/menuselect/mxml) configure: running /bin/sh ./configure --prefix=/usr/local 'CC=gcc' 'CFLAGS=' --cache-file=/dev/null --srcdir=. checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking for ar... /usr/bin/ar checking for cp... /bin/cp checking for ln... /bin/ln checking for mkdir... /bin/mkdir checking for nroff... /usr/bin/nroff checking for rm... /bin/rm checking for strdup... yes checking for vsnprintf... yes configure: creating ./config.status config.status: creating Makefile config.status: creating mxml.list config.status: creating mxml.pc config.status: creating config.h configure: Menuselect build configuration successfully completed make[2]: Entering directory/usr/src/asterisk-addons-1.4.0/menuselect’
make[3]: Entering directory /usr/src/asterisk-addons-1.4.0/menuselect/mxml' gcc -O -Wall -c mxml-attr.c gcc -O -Wall -c mxml-entity.c gcc -O -Wall -c mxml-file.c gcc -O -Wall -c mxml-index.c gcc -O -Wall -c mxml-node.c gcc -O -Wall -c mxml-search.c gcc -O -Wall -c mxml-set.c gcc -O -Wall -c mxml-private.c gcc -O -Wall -c mxml-string.c /bin/rm -f libmxml.a /usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o a - mxml-attr.o a - mxml-entity.o a - mxml-file.o a - mxml-index.o a - mxml-node.o a - mxml-search.o a - mxml-set.o a - mxml-private.o a - mxml-string.o ranlib libmxml.a make[3]: Leaving directory/usr/src/asterisk-addons-1.4.0/menuselect/mxml’
gcc -Wall -o menuselect.o -g -c -D_GNU_SOURCE menuselect.c
gcc -Wall -o menuselect_curses.o -g -c -D_GNU_SOURCE menuselect_curses.c
gcc -Wall -o strcompat.o -g -c -D_GNU_SOURCE strcompat.c
gcc -g -Wall -o menuselect menuselect.o menuselect_curses.o strcompat.o mxml/libmxml.a -lncurses
make[2]: Leaving directory /usr/src/asterisk-addons-1.4.0/menuselect' make[1]: Leaving directory/usr/src/asterisk-addons-1.4.0/menuselect’
make[1]: Entering directory /usr/src/asterisk-addons-1.4.0' build_tools/mkdep -fPIC -fPIC app_addon_sql_mysql.c app_saycountpl.c cdr_addon_mysql.c chan_ooh323.c format_mp3.c res_config_mysql.c gcc: chan_ooh323.c : Aucun fichier ou répertoire de ce type gcc: format_mp3.c : Aucun fichier ou répertoire de ce type app_addon_sql_mysql.c:15:22: erreur: asterisk.h : Aucun fichier ou répertoire de ce type app_saycountpl.c:10:22: erreur: asterisk.h : Aucun fichier ou répertoire de ce type cdr_addon_mysql.c:22:22: erreur: asterisk.h : Aucun fichier ou répertoire de ce type res_config_mysql.c:41:22: erreur: asterisk.h : Aucun fichier ou répertoire de ce type gcc -g -c -fPIC -fPIC -o app_addon_sql_mysql.o app_addon_sql_mysql.c app_addon_sql_mysql.c:15:22: erreur: asterisk.h : Aucun fichier ou répertoire de ce type In file included from /usr/include/asterisk/linkedlists.h:23, from /usr/include/asterisk/chanvars.h:26, from /usr/include/asterisk/channel.h:111, from /usr/include/asterisk/file.h:30, from app_addon_sql_mysql.c:27: /usr/include/asterisk/lock.h: In function ‘ast_mutex_init’: /usr/include/asterisk/lock.h:534: erreur: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function) /usr/include/asterisk/lock.h:534: erreur: (Each undeclared identifier is reported only once /usr/include/asterisk/lock.h:534: erreur: for each function it appears in.) app_addon_sql_mysql.c: In function ‘MYSQL_exec’: app_addon_sql_mysql.c:394: attention : assignment makes pointer from integer without a cast app_addon_sql_mysql.c: Hors de toute fonction : app_addon_sql_mysql.c:423: erreur: static declaration of ‘unload_module’ follows non-static declaration /usr/include/asterisk/module.h:57: erreur: previous declaration of ‘unload_module’ was here app_addon_sql_mysql.c:429: erreur: static declaration of ‘load_module’ follows non-static declaration /usr/include/asterisk/module.h:46: erreur: previous declaration of ‘load_module’ was here app_addon_sql_mysql.c:435: erreur: expected declaration specifiers or ‘...’ before string constant app_addon_sql_mysql.c:435: erreur: expected declaration specifiers or ‘...’ before string constant app_addon_sql_mysql.c:435: attention : la définition de données n'a pas de type ni de classe de stockage make[1]: *** [app_addon_sql_mysql.o] Erreur 1 make[1]: Leaving directory/usr/src/asterisk-addons-1.4.0’
make: *** [all] Erreur 2