From 6ccf8679ab16a790d4e5e902fec4ae8e2e22f50b Mon Sep 17 00:00:00 2001 From: Akira Date: Mon, 16 Dec 2013 21:56:40 +0900 Subject: [PATCH] Change build settings for Debian --- Makefile | 2 +- config.h | 9 +++++++++ config.h.in | 9 +++++++++ configure | 2 +- configure.ac | 2 +- src/inc/config.h | 9 +++++++++ src/inc/ui/disp.h | 9 +++++++++ src/main.c | 1 - src/ui/disp_board_menu.c | 1 - src/ui/disp_editor.c | 1 - src/ui/disp_favorite.c | 1 - src/ui/disp_html_result.c | 1 - src/ui/disp_reslist.c | 1 - src/ui/disp_search_thread.c | 1 - src/ui/disp_string.c | 3 ++- src/ui/disp_threadlist.c | 1 - src/ui/disp_win.c | 2 +- 17 files changed, 42 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ea9aaaf..ffeceeb 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ #Option for development #CFLAGS = -g -Wall -DDEBUG ${DEFS} ${CDEF} #Option for release -CFLAGS = -Wall ${DEFS} ${CDEF} +CFLAGS = -O2 -Wall ${DEFS} ${CDEF} CDEF = -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=700 -D_ISOC99_SOURCE diff --git a/config.h b/config.h index 7c00dc2..fa74fcc 100644 --- a/config.h +++ b/config.h @@ -37,6 +37,9 @@ /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 +/* Define to 1 if you have the `rt' library (-lrt). */ +#define HAVE_LIBRT 1 + /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #define HAVE_LIBSQLITE3 1 @@ -65,6 +68,12 @@ /* Define to 1 if you have the `mkdir' function. */ #define HAVE_MKDIR 1 +/* Define to 1 if you have the header file. */ +#define HAVE_NCURSESW_NCURSES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NCURSES_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_NDBM_H 1 diff --git a/config.h.in b/config.h.in index 97784e4..6db553b 100644 --- a/config.h.in +++ b/config.h.in @@ -36,6 +36,9 @@ /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD +/* Define to 1 if you have the `rt' library (-lrt). */ +#undef HAVE_LIBRT + /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 @@ -64,6 +67,12 @@ /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSESW_NCURSES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSES_H + /* Define to 1 if you have the header file. */ #undef HAVE_NDBM_H diff --git a/configure b/configure index d0f18fa..4c1e1f2 100755 --- a/configure +++ b/configure @@ -3956,7 +3956,7 @@ fi done -for ac_header in arpa/inet.h fcntl.h limits.h locale.h memory.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h wchar.h ndbm.h gdbm-ndbm.h +for ac_header in arpa/inet.h fcntl.h limits.h locale.h memory.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h wchar.h ndbm.h gdbm-ndbm.h ncurses.h ncursesw/ncurses.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/configure.ac b/configure.ac index 5e77e16..323baac 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_CHECK_LIB([z], [inflate]) AC_CHECK_LIB([rt], [clock_gettime]) # Checks for header files. -AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h locale.h memory.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h wchar.h ndbm.h gdbm-ndbm.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h locale.h memory.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h wchar.h ndbm.h gdbm-ndbm.h ncurses.h ncursesw/ncurses.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_PID_T diff --git a/src/inc/config.h b/src/inc/config.h index 7c00dc2..fa74fcc 100644 --- a/src/inc/config.h +++ b/src/inc/config.h @@ -37,6 +37,9 @@ /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 +/* Define to 1 if you have the `rt' library (-lrt). */ +#define HAVE_LIBRT 1 + /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #define HAVE_LIBSQLITE3 1 @@ -65,6 +68,12 @@ /* Define to 1 if you have the `mkdir' function. */ #define HAVE_MKDIR 1 +/* Define to 1 if you have the header file. */ +#define HAVE_NCURSESW_NCURSES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NCURSES_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_NDBM_H 1 diff --git a/src/inc/ui/disp.h b/src/inc/ui/disp.h index e87dc59..4933b19 100644 --- a/src/inc/ui/disp.h +++ b/src/inc/ui/disp.h @@ -17,7 +17,16 @@ */ #ifndef _DISP_H_ #define _DISP_H_ +#include "env.h" + +#ifdef HAVE_NCURSESW_NCURSES_H +#include +#else +#include +#endif + #include "ui/disp_win.h" +#include "_2ch/model_2ch.h" #include "_2ch/search_2ch.h" #include "usr/favorite_t.h" #include "usr/usr_db_t.h" diff --git a/src/main.c b/src/main.c index f1fe2d3..dc4b109 100644 --- a/src/main.c +++ b/src/main.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ui/disp_board_menu.c b/src/ui/disp_board_menu.c index e9b7a73..a092805 100644 --- a/src/ui/disp_board_menu.c +++ b/src/ui/disp_board_menu.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "env.h" #include "utils/nt_std_t.h" diff --git a/src/ui/disp_editor.c b/src/ui/disp_editor.c index bbec39d..65629ff 100644 --- a/src/ui/disp_editor.c +++ b/src/ui/disp_editor.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "env.h" #include "error.h" diff --git a/src/ui/disp_favorite.c b/src/ui/disp_favorite.c index 6187bfd..7df6b71 100644 --- a/src/ui/disp_favorite.c +++ b/src/ui/disp_favorite.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "env.h" #include "nt_string.h" diff --git a/src/ui/disp_html_result.c b/src/ui/disp_html_result.c index 53a8cca..e97eb38 100644 --- a/src/ui/disp_html_result.c +++ b/src/ui/disp_html_result.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "env.h" #include "error.h" diff --git a/src/ui/disp_reslist.c b/src/ui/disp_reslist.c index 4475838..5e62ebf 100644 --- a/src/ui/disp_reslist.c +++ b/src/ui/disp_reslist.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "env.h" diff --git a/src/ui/disp_search_thread.c b/src/ui/disp_search_thread.c index b93db41..2f52add 100644 --- a/src/ui/disp_search_thread.c +++ b/src/ui/disp_search_thread.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "env.h" #include "utils/nt_std_t.h" diff --git a/src/ui/disp_string.c b/src/ui/disp_string.c index 5cdb721..2289f42 100644 --- a/src/ui/disp_string.c +++ b/src/ui/disp_string.c @@ -19,11 +19,12 @@ #include #include #include -#include #include #include #include +#include "utils/nt_std_t.h" +#include "ui/disp.h" #include "ui/disp_string.h" diff --git a/src/ui/disp_threadlist.c b/src/ui/disp_threadlist.c index 0801d1b..c7e1659 100644 --- a/src/ui/disp_threadlist.c +++ b/src/ui/disp_threadlist.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include "env.h" diff --git a/src/ui/disp_win.c b/src/ui/disp_win.c index ad6bf89..35f8d1d 100644 --- a/src/ui/disp_win.c +++ b/src/ui/disp_win.c @@ -17,10 +17,10 @@ */ #include #include -#include #include "utils/nt_std_t.h" +#include "ui/disp.h" #include "ui/disp_win.h" -- 2.11.0