diff --git a/configure b/configure index 862569cb..64ab9529 100755 --- a/configure +++ b/configure @@ -669,6 +669,7 @@ MKDIR_P INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +CFLAGS_LIB OBJEXT EXEEXT ac_ct_CC @@ -3131,9 +3132,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then - CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -fPIC" -#else -# AC_MSG_FAILURE([GCC is required.]) + CFLAGS="$CFLAGS -Wall -Wstrict-prototypes" + CFLAGS_LIB="$CFLAGS -fPIC" + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } @@ -4742,12 +4743,6 @@ $as_echo "$as_me: 'ext-qdatabase' feature is disabled" >&6;} fi -if test "$enableval" = yes; then - CFLAGS="$CFLAGS -g -O2" -else - CFLAGS="$CFLAGS -g -O2" -fi - ## ## --with section ## diff --git a/configure.ac b/configure.ac index e686a708..0630fa55 100644 --- a/configure.ac +++ b/configure.ac @@ -100,9 +100,9 @@ AC_PREFIX_DEFAULT([/usr/local]) ## Checks for programs. AC_PROG_CC if test $ac_compiler_gnu = yes; then - CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -fPIC" -#else -# AC_MSG_FAILURE([GCC is required.]) + CFLAGS="$CFLAGS -Wall -Wstrict-prototypes" + CFLAGS_LIB="$CFLAGS -fPIC" + AC_SUBST(CFLAGS_LIB) fi AC_PROG_CC_C99 if test $ac_cv_prog_cc_c99 = no; then @@ -164,12 +164,6 @@ Q_ARG_DISABLE([ext-qlog], [Disable qlog extension in qlibext library.], [-DDISAB Q_ARG_DISABLE([ext-qhttpclient], [Disable qhttpclient extension in qlibext library.], [-DDISABLE_QHTTPCLIENT]) Q_ARG_DISABLE([ext-qdatabase], [Disable qdatabase extension in qlibext library.], [-DDISABLE_QDATABASE]) -if test "$enableval" = yes; then - CFLAGS="$CFLAGS -g -O2" -else - CFLAGS="$CFLAGS -g -O2" -fi - ## ## --with section ## diff --git a/src/Makefile.in b/src/Makefile.in index 5c3d3d7c..698affb5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -101,7 +101,7 @@ QLIBCEXT_OBJS = \ ## Which compiler & options for release CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS_LIB@ CPPFLAGS = @CPPFLAGS@ -I${QLIBC_INCDIR} -I./internal ## Make Library diff --git a/tests/Makefile.in b/tests/Makefile.in index ba1fd9b2..f5fd7ece 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -40,7 +40,7 @@ CPPFLAGS = @CPPFLAGS@ -I${QLIBC_INCDIR} RM = @RM@ DEPLIBS = @DEPLIBS@ -TARGETS1 = \ +TARGETS = \ test_qstring \ test_qhashtbl \ test_qhasharr \ @@ -52,8 +52,6 @@ TARGETS1 = \ test_qstack \ test_qhash -TARGETS2 = ${TARGETS1} -TARGETS = ${@EXAMPLES_TARGETS@} LIBQLIBC = ${QLIBC_LIBDIR}/libqlibc.a ${DEPLIBS} LIBQLIBCEXT = ${QLIBC_LIBDIR}/libqlibcext.a