Sto cercando di organizzare un mio programma in modo decente perch� il
progetto si spacca in tanti sottoprogetti. In particolar modo vorrei
crearmi una libreria e poi dividere i sorgenti in base ai programmi cui
appartengono.
Allora mi sono messo d'impegno e mi sono ripromesso di fare le cose
per bene con gli autotools. Seguendo l'esempio che ho trovato su
sources.redhat.com/autobook dentro la directory che deve contenere tutto
ho creato config/ e lib/ . Nella prima dovrebbe andarci dell'output
degli autotools e nella seconda ci vanno i sorgenti per la mia libreria.
Prendendo un po' spunto da autoscan ho creato il file configure.in cos�:
# Process this file with autoconf to produce a configure script.
AC_INIT(myericsson, 0.2, [EMAIL PROTECTED])
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(myericsson, 0.2)
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_AWK
AC_PROG_LN_S
# Checks for libraries.
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h termios.h
unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_TYPE_SIZE_T
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([isascii pow strcasecmp strchr strrchr strstr strtol])
AC_OUTPUT(Makefile lib/Makefile)
Poi sono andato nella directory lib/ e ho creato il Makefile.am:
INCLUDES = -I$(top_builddir) -I$(top_srcdir)
noinst_LIBRARIES = libericsson.a
libericsson_a_SOURCES = gsm.c gsm.h \
calls.c calls.h \
ezV24.c ezV24_config.h ezV24.h \
pdu.c pdu.h \
phonebook.c phonebook.h \
sms.c sms.h \
snprintf.c snprintf.h \
sound.c sound.h \
status.c status.h \
time.c time.h \
wap.c wap.h
A questo punto nella radice dei sorgenti ho creato il Makefile.am con:
SUBDIRS = lib
Teoricamente dovrebbe andare tutto. A questo punto do i seguenti
comandi:
[EMAIL PROTECTED]:~/Projects/myericsson$ aclocal -I config
[EMAIL PROTECTED]:~/Projects/myericsson$ autoheader
[EMAIL PROTECTED]:~/Projects/myericsson$ automake --foreign --add-missing --copy
[EMAIL PROTECTED]:~/Projects/myericsson$ autoconf
[EMAIL PROTECTED]:~/Projects/myericsson$
nessun errore, sono pronto per eseguire il ./configure. Ed ecco cosa
ottengo:
[EMAIL PROTECTED]:~/Projects/myericsson$ ./configure
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: ls -t appears
to fail. Make sure there is not a broken alias in your environment
configure: error: newly created file is older than distributed files!
Check your system clock
[EMAIL PROTECTED]:~/Projects/myericsson$
Che cavolo vuol dire!?!? Le date dei file sembrano corrette.... Idem
l'orologio... E poi.. possibile che sia l'unico script che mi d� questa
rogna? tutti gli altri configure dei vari pacchetti vanno....
Help! :,-(
--
Non c'� pi� forza nella normalit�, c'� solo monotonia.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]