Lines Matching +full:linux +full:- +full:cxx +full:- +full:install
3 set -e
5 cc=${CC:-gcc}
6 cxx=${CXX:-g++}
11 --help|-h) show_help=yes
13 --prefix=*) prefix="$optarg"
15 --includedir=*) includedir="$optarg"
17 --libdir=*) libdir="$optarg"
19 --libdevdir=*) libdevdir="$optarg"
21 --mandir=*) mandir="$optarg"
23 --datadir=*) datadir="$optarg"
25 --cc=*) cc="$optarg"
27 --cxx=*) cxx="$optarg"
29 --nolibc) liburing_nolibc="yes"
33 echo "Try '$0 --help' for more information"
39 if test -z "$prefix"; then
42 if test -z "$includedir"; then
45 if test -z "$libdir"; then
48 if test -z "$libdevdir"; then
51 if test -z "$mandir"; then
54 if test -z "$datadir"; then
69 --help print this message
70 --prefix=PATH install in PATH [$prefix]
71 --includedir=PATH install headers in PATH [$includedir]
72 --libdir=PATH install runtime libraries in PATH [$libdir]
73 --libdevdir=PATH install development libraries in PATH [$libdevdir]
74 --mandir=PATH install man pages in PATH [$mandir]
75 --datadir=PATH install shared data in PATH [$datadir]
76 --cc=CMD use CMD as the C compiler
77 --cxx=CMD use CMD as the C++ compiler
78 --nolibc build liburing without libc
83 TMP_DIRECTORY="$(mktemp -d)"
84 TMPC="$TMP_DIRECTORY/liburing-conf.c"
85 TMPC2="$TMP_DIRECTORY/liburing-conf-2.c"
86 TMPCXX="$TMP_DIRECTORY/liburing-conf-2.cpp"
87 TMPO="$TMP_DIRECTORY/liburing-conf.o"
88 TMPE="$TMP_DIRECTORY/liburing-conf.exe"
93 # see <1285349658-3122-1-git-send-email-[email protected]>
94 trap "rm -rf $TMP_DIRECTORY" EXIT INT QUIT TERM
96 rm -rf config.log
98 config_host_mak="config-host.mak"
99 config_host_h="config-host.h"
101 rm -rf $config_host_mak
102 rm -rf $config_host_h
107 rm -rf $config_host_mak
108 rm -rf $config_host_h
114 printf "%-30s%s\n" "$1" "$2"
118 CFLAGS="-D_GNU_SOURCE -include config-host.h"
123 echo " * Automatically generated by configure - do not modify" >> $config_host_h
129 echo "# Automatically generated by configure - do not modify" > $config_host_mak
136 echo $cxx "$@" >> config.log
137 $cxx "$@" >> config.log 2>&1 || return $?
145 # Test passed. If this is an --enable-werror build, rerun
146 # the test with -Werror and bail out if it fails. This
147 # makes warning-generating-errors in configure test code
152 # Don't bother rerunning the compile if we were already using -Werror
154 *-Werror*)
158 echo $cc -Werror "$@" >> config.log
159 $cc -Werror "$@" >> config.log 2>&1 && return $?
160 echo "ERROR: configure test passed without -Werror but failed with -Werror."
163 fatal "You can run configure with --disable-werror to bypass this check."
170 do_cc $CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
177 do_cxx $CFLAGS $local_cflags -o $TMPE $TMPCXX $LDFLAGS $local_ldflags
206 # check for compiler -Wstringop-overflow
209 #include <linux/fs.h>
215 if compile_prog "-Werror -Wstringop-overflow=0" "" "stringop_overflow"; then
221 # check for compiler -Warryr-bounds
224 #include <linux/fs.h>
230 if compile_prog "-Werror -Warray-bounds=0" "" "array_bounds"; then
240 #include <linux/fs.h>
257 #include <linux/time.h>
258 #include <linux/time_types.h>
279 #include <linux/openat2.h>
381 if compile_prog "-Werror=implicit-function-declaration" "" "has_memfd_create"; then
428 echo "CXX=$cxx" >> $config_host_mak
429 print_config "CXX" "$cxx"
434 /* SPDX-License-Identifier: MIT */
458 #include <linux/time_types.h>
474 #include <linux/openat2.h>