configure

Automake + 条件コンパイル

条件コンパイルを試したメモ。 ある条件のときに、特定のソースコードをコンパイルから除外 or 包含する。 libevent の configure を参考にしました。 通信システム(select, poll, epoll, …etc)の有無をチェックしてコンパイル対象を選択するとこが今回の目…

autotools + with-mysql

書くと言いつつだいぶサボっていた autotools のメモ。 今回は、–with-mysql の付け方をメモ。 サンプルとして書いたコードが以下のもの。 #include <stdio.h> #include <mysql.h> int main() { MYSQL sql; MYSQL_RES *pres; MYSQL_ROW row; if( !mysql_init( &sql)) { puts("i</mysql.h></stdio.h>…

autotools + config.nice

autotools のメモ2 configure.in に ./configure [引数] コマンドを記録する処理を加えた。 以下のコードを configure.in に追加 configure.in #---------------------------------------------------------------- # Create config.nice #----------------…

autotools + 使い方

autotools + 使い方 autotools の基本的な使い方をざっくばらんにメモ。 テスト用のディレクトリを作成する $ mkdir autotool $ cd autotool 適当にソースコードを記述する $ vi main.cpp #include int main() { puts("hello autotool."); return0; } autosc…