diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 241 |
1 files changed, 241 insertions, 0 deletions
@@ -604,6 +604,8 @@ MYSQL_CFLAGS MYSQL_VERSION HAVE_MYSQL MYSQL_CONFIG_HOME +WITH_PLUGINS +SOFLAGS AR SET_MAKE EGREP @@ -2127,6 +2129,8 @@ ac_config_files="$ac_config_files 3rdparty/mt19937ar/Makefile 3rdparty/libconfig ac_config_files="$ac_config_files src/char/Makefile src/login/Makefile" +ac_config_files="$ac_config_files src/plugins/Makefile" + ac_config_files="$ac_config_files src/map/Makefile src/tool/Makefile" ac_config_files="$ac_config_files src/test/Makefile" @@ -4425,6 +4429,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wno-sign-compare" CPPFLAGS="$CPPFLAGS -I../common" +# flags used for compiling shared objects +SOFLAGS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 @@ -4947,6 +4953,240 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$OLD_CFLAGS" +# +# option for shared objects +# +echo "$as_me:$LINENO: checking how to make shared objects" >&5 +echo $ECHO_N "checking how to make shared objects... $ECHO_C" >&6 +OLD_CFLAGS="$CFLAGS" +compiler_shared_objects="" +if test "$compiler_supports_pic" = "yes" ; then + my_shared_test_flags="$CFLAGS -fPIC" +fi +# default +CFLAGS="$my_shared_test_flags -shared" +cat >conftest.$ac_ext <<_ACEOF + + int bar = 0; + + int foo(void) + { + return bar; + } + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + compiler_shared_objects="-shared" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +# BeOS specific +CFLAGS="$my_shared_test_flags -nostart" +cat >conftest.$ac_ext <<_ACEOF + + int bar = 0; + + int foo(void) + { + return bar; + } + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + compiler_shared_objects="-nostart" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +my_shared_test_flags="" +CFLAGS="$OLD_CFLAGS" +if test "$compiler_supports_shared_objects" = "no" ; then + echo "$as_me:$LINENO: result: not supported" >&5 +echo "${ECHO_T}not supported" >&6 + { echo "$as_me:$LINENO: compiler is unable to generate shared objects, disabled plugins (optional)" >&5 +echo "$as_me: compiler is unable to generate shared objects, disabled plugins (optional)" >&6;} + WITH_PLUGINS="no" +else + echo "$as_me:$LINENO: result: $compiler_shared_objects" >&5 +echo "${ECHO_T}$compiler_shared_objects" >&6 + SOFLAGS="$SOFLAGS $compiler_shared_objects" + +# +# shared objects need position independent code; some platforms emit +# it always, others need -fPIC +# +echo "$as_me:$LINENO: checking whether $CC needs -fPIC for shared objects" >&5 +echo $ECHO_N "checking whether $CC needs -fPIC for shared objects... $ECHO_C" >&6 +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $SOFLAGS" +WITH_PLUGINS="yes" +cat >conftest.$ac_ext <<_ACEOF + + int bar = 0; + + int foo(void) + { + return bar; + } + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + CFLAGS="$OLD_CFLAGS" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + if test "$compiler_supports_pic" = "yes" ; then + # Verify if -shared really fails due to lack of -fPIC or something else + CFLAGS="$CFLAGS -fPIC" + cat >conftest.$ac_ext <<_ACEOF + + int bar = 0; + + int foo(void) + { + return bar; + } + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + CFLAGS="$OLD_CFLAGS -fPIC" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no, but fails for another reason" >&5 +echo "${ECHO_T}no, but fails for another reason" >&6 + { { echo "$as_me:$LINENO: error: compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping" >&5 +echo "$as_me: error: compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping" >&2;} + { (exit 1); exit 1; }; } + + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + # Disable compilation of plugins (optional), so 'make all' does not fail + echo "$as_me:$LINENO: result: yes, but unsupported" >&5 +echo "${ECHO_T}yes, but unsupported" >&6 + { echo "$as_me:$LINENO: compiler is unable to generate position independent code, disabled plugins (optional)" >&5 +echo "$as_me: compiler is unable to generate position independent code, disabled plugins (optional)" >&6;} + WITH_PLUGINS="no" + fi + + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi # # -O2 implies -fstrict-aliasing, but the code is not safe for that @@ -6754,6 +6994,7 @@ do "src/char/Makefile") CONFIG_FILES="$CONFIG_FILES src/char/Makefile" ;; "src/login/Makefile") CONFIG_FILES="$CONFIG_FILES src/login/Makefile" ;; "src/map/Makefile") CONFIG_FILES="$CONFIG_FILES src/map/Makefile" ;; + "src/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/Makefile" ;; "src/tool/Makefile") CONFIG_FILES="$CONFIG_FILES src/tool/Makefile" ;; "src/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/test/Makefile" ;; |