OSDN Git Service

Change build settings for glic prior to version 2.17.
authorAkira <akohta001@gmail.com>
Sat, 14 Dec 2013 11:41:59 +0000 (20:41 +0900)
committerAkira <akohta001@gmail.com>
Sat, 14 Dec 2013 11:41:59 +0000 (20:41 +0900)
Makefile
configure
configure.ac

index 34098b9..ea9aaaf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -94,7 +94,7 @@ srcdir = .
 
 CC = gcc
 DEFS = -DHAVE_CONFIG_H
-LIBS = -lz -lssl -lsqlite3 -lpthread -lncursesw -lm -lgdbm_compat -ldl -lcrypto 
+LIBS = -lrt -lz -lssl -lsqlite3 -lpthread -lncursesw -lm -lgdbm_compat -ldl -lcrypto 
 INCLUDES = -I/usr/include/gdbm -I${INC_DIR}
 OBJ_DIR = ./obj
 GEN_DIR = ./gen
index 65fc8aa..d0f18fa 100755 (executable)
--- a/configure
+++ b/configure
@@ -3512,6 +3512,51 @@ _ACEOF
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
+$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+if ${ac_cv_lib_rt_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_clock_gettime=yes
+else
+  ac_cv_lib_rt_clock_gettime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+  LIBS="-lrt $LIBS"
+
+fi
+
 
 # Checks for header files.
 ac_ext=c
index 501bcb4..5e77e16 100644 (file)
@@ -21,6 +21,7 @@ AC_CHECK_LIB([pthread], [pthread_create])
 AC_CHECK_LIB([sqlite3], [sqlite3_initialize])
 AC_CHECK_LIB([ssl], [SSL_library_init])
 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])