Missing -fPIC error in build of cardgui; refs #33
This commit is contained in:
		| @@ -63,17 +63,25 @@ AC_DEFUN([AX_CXX_CHECK_QT], [ | |||||||
|   PKG_CHECK_MODULES([$1], [${qt_modules//Qt/Qt5}], [ |   PKG_CHECK_MODULES([$1], [${qt_modules//Qt/Qt5}], [ | ||||||
|     HAVE_$1=1 |     HAVE_$1=1 | ||||||
|     AC_DEFINE([HAVE_$1]) |     AC_DEFINE([HAVE_$1]) | ||||||
|     CPPFLAGS+=" ${$1_CFLAGS}" |     AM_CPPFLAGS+=" ${$1_CFLAGS}" | ||||||
|     CXXFLAGS+=" ${$1_CFLAGS}" |     AM_CXXFLAGS+=" ${$1_CFLAGS}" | ||||||
|     LIBS+=" ${$1_LIBS}" |     LIBS+=" ${$1_LIBS}" | ||||||
|   ], [ |   ], [ | ||||||
|     PKG_CHECK_MODULES([$1], [${qt_modules}], [ |     PKG_CHECK_MODULES([$1], [${qt_modules}], [ | ||||||
|       HAVE_$1=1 |       HAVE_$1=1 | ||||||
|       AC_DEFINE([HAVE_$1]) |       AC_DEFINE([HAVE_$1]) | ||||||
|       CPPFLAGS+=" ${$1_CFLAGS}" |       AM_CPPFLAGS+=" ${$1_CFLAGS}" | ||||||
|       CXXFLAGS+=" ${$1_CFLAGS}" |       AM_CXXFLAGS+=" ${$1_CFLAGS}" | ||||||
|       LIBS+=" ${$1_LIBS}" |       LIBS+=" ${$1_LIBS}" | ||||||
|     ]) |     ]) | ||||||
|   ]) |   ]) | ||||||
|   AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) |   AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) | ||||||
|  |   AC_SUBST(AM_CPPFLAGS) | ||||||
|  |   AC_SUBST(AM_CXXFLAGS) | ||||||
|  |   AX_CHECK_COMPILE_FLAG(-fPIC, [AM_CXXFLAGS+=" -fPIC"]) | ||||||
|  |   AX_CHECK_COMPILE_FLAG(-DPIC, [AM_CXXFLAGS+=" -DPIC"]) | ||||||
|  |   AX_CHECK_COMPILE_FLAG(-fPIE, [AM_CXXFLAGS+=" -fPIE"]) | ||||||
|  |   AX_CHECK_LINK_FLAG(-fPIC, [LDFLAGS+=" -fPIC"]) | ||||||
|  |   AX_CHECK_LINK_FLAG(-DPIC, [LDFLAGS+=" -DPIC"]) | ||||||
|  |   AX_CHECK_LINK_FLAG(-fPIE, [LDFLAGS+=" -fPIE"]) | ||||||
| ]) | ]) | ||||||
|   | |||||||
| @@ -74,7 +74,7 @@ AC_SUBST_FILE(README) | |||||||
| CHANGE_LOG=ChangeLog | CHANGE_LOG=ChangeLog | ||||||
| AC_SUBST_FILE(CHANGE_LOG) | AC_SUBST_FILE(CHANGE_LOG) | ||||||
|  |  | ||||||
| CPPFLAGS="${CPPFLAGS} -DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" | AM_CPPFLAGS+="-DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" | ||||||
|  |  | ||||||
| # Get rid of that stupid -O2 -g options! | # Get rid of that stupid -O2 -g options! | ||||||
| CXXFLAGS="${CXXFLAGS:-}" | CXXFLAGS="${CXXFLAGS:-}" | ||||||
| @@ -105,7 +105,7 @@ AC_ARG_ENABLE(pkcs11-download, | |||||||
|      for f in $(wget -q -O- ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/ 2>&1 | html2 | sed -n 's,.*/a/@href=\(.*\.h\)$,\1,gp'); do |      for f in $(wget -q -O- ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/ 2>&1 | html2 | sed -n 's,.*/a/@href=\(.*\.h\)$,\1,gp'); do | ||||||
|        wget --unlink $f |        wget --unlink $f | ||||||
|      done |      done | ||||||
|      CPPFLAGS="${CPPFLAGS} -I$(pwd)" |      AM_CPPFLAGS+="-I$(pwd)" | ||||||
|      cd - |      cd - | ||||||
|    fi |    fi | ||||||
|   ]) |   ]) | ||||||
| @@ -121,7 +121,7 @@ AC_ARG_ENABLE(pedantic, | |||||||
|   [AS_HELP_STRING([--enable-pedantic], |   [AS_HELP_STRING([--enable-pedantic], | ||||||
|                   [enable all warnings and checks, abort on warnings])], |                   [enable all warnings and checks, abort on warnings])], | ||||||
|   [have_pedantic="$enableval"; test "$enableval" = "yes" &&  \ |   [have_pedantic="$enableval"; test "$enableval" = "yes" &&  \ | ||||||
|      AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) |      AM_CXXFLAGS+=" -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) | ||||||
| dnl problem in libs: -Wshadow -Wcast-qual | dnl problem in libs: -Wshadow -Wcast-qual | ||||||
| dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) | dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) | ||||||
| AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") | AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") | ||||||
|   | |||||||
| @@ -40,8 +40,6 @@ if HAVE_QTNETWORK | |||||||
| noinst_PROGRAMS += suisse-id-demo | noinst_PROGRAMS += suisse-id-demo | ||||||
| noinst_HEADERS = suisse-id-demo.hxx | noinst_HEADERS = suisse-id-demo.hxx | ||||||
| suisse_id_demo_SOURCES = suisse-id-demo.cxx | suisse_id_demo_SOURCES = suisse-id-demo.cxx | ||||||
| suisse_id_demo_CXXFLAGS = ${QT_NETWORK_CFLAGS} |  | ||||||
| suisse_id_demo_LDADD = ${QT_NETWORK_LIBS} |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| %_ui.hxx: %.ui | %_ui.hxx: %.ui | ||||||
|   | |||||||
| @@ -17,10 +17,8 @@ AM_LDFLAGS = -lwinscard | |||||||
| endif | endif | ||||||
| if !MINGW32 | if !MINGW32 | ||||||
| if MAC | if MAC | ||||||
| AM_CPPFLAGS += -I/opt/local/include -I/Library/OpenSC/include | AM_CPPFLAGS += -I/Library/OpenSC/include | ||||||
| AM_LDFLAGS = -F/System/Library/Frameworks/PCSC.framework -L/opt/local/lib -framework PCSC | AM_LDFLAGS = -F/System/Library/Frameworks/PCSC.framework -framework PCSC | ||||||
| else |  | ||||||
| AM_CPPFLAGS += -I/usr/include/PCSC |  | ||||||
| endif | endif | ||||||
| endif | endif | ||||||
|  |  | ||||||
| @@ -54,8 +52,7 @@ cardgui_SOURCES = cardgui.cxx cardgui.hxx password.hxx cardgui-model.hxx \ | |||||||
| nodist_cardgui_SOURCES = cardgui_ui.hxx password_ui.hxx \ | nodist_cardgui_SOURCES = cardgui_ui.hxx password_ui.hxx \ | ||||||
|                          moc_cardgui.cxx moc_password.cxx moc_cardgui-model.cxx |                          moc_cardgui.cxx moc_password.cxx moc_cardgui-model.cxx | ||||||
| BUILT_SOURCES = ${nodist_cardgui_SOURCES} | BUILT_SOURCES = ${nodist_cardgui_SOURCES} | ||||||
| cardgui_CXXFLAGS = ${QT_GUI_CFLAGS} | cardgui_LDADD = libpcscxx.la ${libpcscxx_la_LIBADD} | ||||||
| cardgui_LDADD = ${QT_GUI_LIBS} libpcscxx.la ${libpcscxx_la_LIBADD} |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| noinst_PROGRAMS = versiontest | noinst_PROGRAMS = versiontest | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user