Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Several exercises are available :
* GNU/Linux System Programming
* Embedded system with RPI3
* Usefool Tools (autotools, docker, git, ...)
My new fix
16 changes: 16 additions & 0 deletions labs/autotools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,34 @@ de compilation se passe bien.

**Question 1** : En analysant le contenu du fichier *configure.ac*, déterminez
quel header est vérifié pendant la phase de configuration.

sys/socket.h


**Question 2** : Modifiez le fichier *configure.ac* pour forcer l'étape de
configuration à vérifier la présence d'un header inexistant
sur le système. Relancez la phase de configuration et observez
les plaintes! Remettez les choses dans l'ordre lorsque vous
avez terminé.

checking sys/socket_not_found.h usability... no
checking sys/socket_not_found.h presence... no
checking for sys/socket_not_found.h... no
configure: error: "Couldn't find sys/socket.h"


**Question 3** : En cherchant sur le net, déterminez à quoi sert la macro
*AC_ENABLE_SHARED* utilisée dans le fichier *configure.ac*.


Change the default behaviour for LT_INIT to enable shared libraries. This is the default on all systems where Libtool knows how to create shared libraries. The user may still override this default by specifying ‘--disable-shared’. The option ‘shared’ to LT_INIT is a shorthand for this. AM_ENABLE_SHARED is a deprecated alias for AC_ENABLE_SHARED.

**Question 4** : À quoi sert le fichier *Makefile.am*?

Makefile.am is a programmer-defined file and is used by automake to generate the Makefile.in file (the .am stands for automake). The configure script typically seen in source tarballs will use the Makefile.in to generate a Makefile.
The configure script itself is generated from a programmer-defined file named either configure.ac or configure.in (deprecated).
.ac (for autoconf) can be preferable since it differentiates it from the generated Makefile.in files and that way there can be rules such as make dist-clean which runs rm -f *.in. Since it is a generated file, it is not typically stored in a revision system such as Git, SVN, Mercurial or CVS, rather the .ac file would be.

Lorsque la phase de configuration se passe bien, on peut lancer la phase de
compilation :

Expand Down
Loading