[Pvfs2-cvs] commit by slang in pvfs2: Makefile.in configure
configure.in pvfs2-config.h.in
CVS commit program
cvs at parl.clemson.edu
Fri Apr 17 15:18:23 EDT 2009
Update of /projects/cvsroot/pvfs2
In directory parlweb1:/tmp/cvs-serv32398
Modified Files:
Tag: solaris-branch
Makefile.in configure configure.in pvfs2-config.h.in
Log Message:
initial support for solaris. doesn't include /dev/epoll support. See trac ticket #97.
Index: Makefile.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/Makefile.in,v
diff -p -u -r1.280 -r1.280.6.1
--- Makefile.in 2 Mar 2009 20:59:15 -0000 1.280
+++ Makefile.in 17 Apr 2009 19:18:18 -0000 1.280.6.1
@@ -86,6 +86,7 @@ BUILD_KERNEL = @BUILD_KERNEL@
NEEDS_LIBRT = @NEEDS_LIBRT@
TARGET_OS_DARWIN = @TARGET_OS_DARWIN@
TARGET_OS_LINUX = @TARGET_OS_LINUX@
+TARGET_OS_SOLARIS = @TARGET_OS_SOLARIS@
GNUC = @GNUC@
INTELC = @INTELC@
# configure default is silent, unless --enable-verbose-build in
@@ -187,6 +188,10 @@ DB_CFLAGS = @DB_CFLAGS@
LDSHARED = $(CC) -shared
PICFLAGS = -fPIC
LIBS += -lpvfs2 @LIBS@
+ifdef TARGET_OS_SOLARIS
+ CFLAGS += -D_SOLARIS
+ LIBS += -lnsl -lsocket
+endif
LIBS_THREADED += -lpvfs2-threaded @LIBS@
# need to include external dependency libs when building shared libraries
DEPLIBS := @LIBS@
@@ -311,7 +316,11 @@ SERVERCFLAGS = @CFLAGS@ -D__GEN_POSIX_LO
# server side flow protocol connecting BMI with NCAC cache
SERVERCFLAGS += -D__STATIC_FLOWPROTO_BMI_CACHE__
-SERVERLIBS = -lpvfs2-server @LIBS@ @DB_LIB@ -lpthread
+SERVERLIBS = -lpvfs2-server @LIBS@ @DB_LIB@ -lpthread
+
+ifdef TARGET_OS_SOLARIS
+ SERVERLIBS += -lnsl -lsocket
+endif
ifdef NEEDS_LIBRT
SERVERLIBS += -lrt
Index: configure
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure,v
diff -p -u -r1.414 -r1.414.2.1
--- configure 6 Apr 2009 15:09:14 -0000 1.414
+++ configure 17 Apr 2009 19:18:18 -0000 1.414.2.1
@@ -722,6 +722,7 @@ DB_CFLAGS
DB_LIB
NEEDS_LIBRT
TARGET_OS_DARWIN
+TARGET_OS_SOLARIS
TARGET_OS_LINUX
BUILD_BMI_TCP
BUILD_GM
@@ -7225,6 +7226,123 @@ echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking for O_DIRECT flag to open" >&5
+echo $ECHO_N "checking for O_DIRECT flag to open... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+
+int
+main ()
+{
+
+ open(NULL, O_DIRECT);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_O_DIRECT 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking for Solaris directio system call" >&5
+echo $ECHO_N "checking for Solaris directio system call... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <fcntl.h>
+
+int
+main ()
+{
+
+ directio(0, DIRECTIO_ON);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIRECTIO_SYSCALL 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then
@@ -14792,6 +14910,17 @@ _ACEOF
TARGET_OS_DARWIN=1
;;
+ *solaris*)
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_OS_DARWIN 1
+_ACEOF
+
+ TARGET_OS_SOLARIS=1
+
+ CFLAGS+=-lnsl -lsocket
+ SERVER_CFLAGS+=-lnsl -lsocket
+ ;;
*linux*)
cat >>confdefs.h <<\_ACEOF
@@ -17134,7 +17263,7 @@ fi
if test $ac_cv_header_sys_sysinfo_h = yes; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYSINFO 1
+#define HAVE_SYSINFO_H 1
_ACEOF
@@ -17142,6 +17271,67 @@ fi
+tmpcflags=$CFLAGS
+CFLAGS=-Werror-implicit-function-declaration
+{ echo "$as_me:$LINENO: checking for sysinfo()" >&5
+echo $ECHO_N "checking for sysinfo()... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <sys/sysinfo.h>
+
+int
+main ()
+{
+
+ struct sysinfo info;
+ int ret;
+ ret = sysinfo(&info);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYSINFO 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$tmpcflags
+
for ac_func in strnlen
do
@@ -18697,6 +18887,69 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: checking that pwd_p gets returned from getpwuid_r" >&5
+echo $ECHO_N "checking that pwd_p gets returned from getpwuid_r... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <pwd.h>
+
+int
+main ()
+{
+
+ struct passwd *pwd_p;
+ uid_t uid;
+ struct passwd *pwdbuf;
+ char *buf;
+ size_t buflen;
+ pwd_p = getpwuid_r(uid, pwdbuf, buf, buflen);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPWUID_R_PASSWD_RETURN 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
for d in src/apps src/io src/common src/client src/kernel \
doc src/apps/kernel test; do
install -d $d;
@@ -19519,6 +19772,7 @@ DB_CFLAGS!$DB_CFLAGS$ac_delim
DB_LIB!$DB_LIB$ac_delim
NEEDS_LIBRT!$NEEDS_LIBRT$ac_delim
TARGET_OS_DARWIN!$TARGET_OS_DARWIN$ac_delim
+TARGET_OS_SOLARIS!$TARGET_OS_SOLARIS$ac_delim
TARGET_OS_LINUX!$TARGET_OS_LINUX$ac_delim
BUILD_BMI_TCP!$BUILD_BMI_TCP$ac_delim
BUILD_GM!$BUILD_GM$ac_delim
@@ -19545,7 +19799,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 36; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure.in,v
diff -p -u -r1.354 -r1.354.6.1
--- configure.in 26 Feb 2009 19:42:48 -0000 1.354
+++ configure.in 17 Apr 2009 19:18:22 -0000 1.354.6.1
@@ -442,6 +442,39 @@ AC_TRY_COMPILE(
,
AC_MSG_RESULT(no)
)
+
+dnl Check for O_DIRECT flag to open
+AC_MSG_CHECKING([for O_DIRECT flag to open])
+AC_TRY_COMPILE(
+ [
+ #define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ ],
+ [
+ open(NULL, O_DIRECT);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_O_DIRECT, 1, Define if O_DIRECT flag exists),
+ AC_MSG_RESULT(no)
+)
+
+dnl Check for Solaris directio() system call
+AC_MSG_CHECKING([for Solaris directio system call])
+AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <fcntl.h>
+ ],
+ [
+ directio(0, DIRECTIO_ON);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_DIRECTIO_SYSCALL, 1, Define if Solaris directio syscall exists),
+ AC_MSG_RESULT(no)
+)
+
dnl Check byte ordering
AC_C_BIGENDIAN
@@ -855,6 +888,13 @@ case "$host_os" in
TARGET_OS_DARWIN=1
AC_SUBST(TARGET_OS_DARWIN)
;;
+ *solaris*)
+ AC_DEFINE([TARGET_OS_DARWIN], 1, Define if on solaris)
+ TARGET_OS_SOLARIS=1
+ AC_SUBST(TARGET_OS_SOLARIS)
+ CFLAGS+=-lnsl -lsocket
+ SERVER_CFLAGS+=-lnsl -lsocket
+ ;;
*linux*)
AC_DEFINE([TARGET_OS_LINUX], 1, Define if on linux)
TARGET_OS_LINUX=1
@@ -949,9 +989,26 @@ AC_TRY_COMPILE([
dnl
dnl look for sysinfo header
AC_CHECK_HEADER(sys/sysinfo.h,
- AC_DEFINE(HAVE_SYSINFO, 1, Define if sysinfo.h is present)
+ AC_DEFINE(HAVE_SYSINFO_H, 1, Define if sysinfo.h is present)
)
+tmpcflags=$CFLAGS
+CFLAGS=-Werror-implicit-function-declaration
+AC_MSG_CHECKING([for sysinfo()])
+AC_TRY_COMPILE([
+ #include <sys/sysinfo.h>
+ ],
+ [
+ struct sysinfo info;
+ int ret;
+ ret = sysinfo(&info);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SYSINFO, 1, Define if sysinfo() exists),
+ AC_MSG_RESULT(no)
+)
+CFLAGS=$tmpcflags
+
dnl for regular functions, add another AC_CHECK_FUNCS line
AC_CHECK_FUNCS(strnlen)
AC_CHECK_FUNCS(strtoull)
@@ -1085,6 +1142,27 @@ AC_TRY_COMPILE(
], [],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GNU_STRERROR_R, 1, Define if strerror_r is GNU-specific)
+ ,
+ AC_MSG_RESULT(no)
+)
+
+dnl what does getpwuid_r return?
+AC_MSG_CHECKING([that pwd_p gets returned from getpwuid_r])
+AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <pwd.h>
+ ],
+ [
+ struct passwd *pwd_p;
+ uid_t uid;
+ struct passwd *pwdbuf;
+ char *buf;
+ size_t buflen;
+ pwd_p = getpwuid_r(uid, pwdbuf, buf, buflen);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETPWUID_R_PASSWD_RETURN, 1, Define if getpwuid_r returns the passwd struct pointer)
,
AC_MSG_RESULT(no)
)
Index: pvfs2-config.h.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
diff -p -u -r1.128 -r1.128.6.1
--- pvfs2-config.h.in 1 Apr 2009 21:27:36 -0000 1.128
+++ pvfs2-config.h.in 17 Apr 2009 19:18:22 -0000 1.128.6.1
@@ -61,6 +61,9 @@
/* Define if super_operations statfs has dentry argument */
#undef HAVE_DENTRY_STATFS_SOP
+/* Define if Solaris directio syscall exists */
+#undef HAVE_DIRECTIO_SYSCALL
+
/* Define if kernel super_operations contains drop_inode field */
#undef HAVE_DROP_INODE
@@ -122,6 +125,9 @@
/* Define to 1 if you have the `getmntent' function. */
#undef HAVE_GETMNTENT
+/* Define if getpwuid_r returns the passwd struct pointer */
+#undef HAVE_GETPWUID_R_PASSWD_RETURN
+
/* Define if struct super_operations in kernel has get_fs_key callback */
#undef HAVE_GET_FS_KEY_SUPER_OPERATIONS
@@ -260,6 +266,9 @@
/* Define to 1 if you have the <openssl/evp.h> header file. */
#undef HAVE_OPENSSL_EVP_H
+/* Define if O_DIRECT flag exists */
+#undef HAVE_O_DIRECT
+
/* Define if sysctl proc handlers have 6th argument */
#undef HAVE_PROC_HANDLER_SIX_ARG
@@ -357,9 +366,12 @@
/* Define if struct xtvec is defined in the kernel */
#undef HAVE_STRUCT_XTVEC
-/* Define if sysinfo.h is present */
+/* Define if sysinfo() exists */
#undef HAVE_SYSINFO
+/* Define if sysinfo.h is present */
+#undef HAVE_SYSINFO_H
+
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H
@@ -451,7 +463,7 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* Define if on darwin */
+/* Define if on solaris */
#undef TARGET_OS_DARWIN
/* Define if on linux */
More information about the Pvfs2-cvs
mailing list