Skip to content

Commit ec8a90e

Browse files
committed
chore: remove manual pthread link flag detection and LDFLAGS modification #359
Remove manual pthread link flag detection and LDFLAGS modification. Rely on standard AX_PTHREAD substitutions for CC and LIBS, and exclude PTHREAD_CFLAGS from CPPFLAGS to avoid redundancy.
1 parent 2228285 commit ec8a90e

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

configure.ac

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,6 @@ test -z $DOXYGEN && \
184184

185185
#### Library Checks ####
186186
AX_PTHREAD
187-
AX_PTHREAD_LINK_CFLAGS=""
188-
AS_CASE(
189-
[" ${PTHREAD_CFLAGS} "],
190-
[*" -pthread "*], [AX_PTHREAD_LINK_CFLAGS="-pthread"],
191-
[*" -pthreads "*], [AX_PTHREAD_LINK_CFLAGS="-pthreads"]
192-
)
193-
AS_IF(
194-
[test -n "${AX_PTHREAD_LINK_CFLAGS}"],
195-
[LDFLAGS="${AX_PTHREAD_LINK_CFLAGS} ${LDFLAGS}"]
196-
)
197-
LDFLAGS="${AX_PTHREAD_LINK_CFLAGS} ${LDFLAGS}"
198187
AC_SUBST([LIBS], "${PTHREAD_LIBS} ${LIBS}")
199188
AC_SUBST([CC], "${PTHREAD_CC}")
200189

@@ -204,7 +193,7 @@ AC_SUBST([LDFLAGS], "${LDFLAGS} ${BOOST_LDFLAGS}")
204193
AC_SUBST([LIBS], "-lstdc++fs -lstdc++ ${LIBS}")
205194

206195
#### Header Checks ####
207-
AC_SUBST([CPPFLAGS], "${CPPFLAGS} ${PTHREAD_CFLAGS} ${BOOST_CPPFLAGS}")
196+
AC_SUBST([CPPFLAGS], "${CPPFLAGS} ${BOOST_CPPFLAGS}")
208197

209198
#### Compilation Options ####
210199
AC_SUBST([CXXFLAGS_IWYU], "${CXXFLAGS} -std=c++20 -Werror -Wall -Wextra -pedantic-errors")

0 commit comments

Comments
 (0)