Redhat安装gflags

1.https://github.com/schuhschuh/gflags/releases下载安装包

2.解压,打开相应文件夹

unzip gflags-1.7.zip
cd gflags-1.7/
mkdir build
cd build
cmake ..
ccmake ..
bash./configure
make
makeinstall

具体操作过程:

[root@A01-R04-I221-18 src]# cmake ..
CMake Error: The source directory "/home/xxs/xxs/gflags-1.7" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[root@A01-R04-I221-18 src]# cd ..
[root@A01-R04-I221-18 gflags-1.7]# ls
AUTHORS    INSTALL      NEWS                aclocal.m4  config.guess  configure.ac  google-gflags.sln  m4        src
COPYING    Makefile.am  README              autogen.sh  config.sub    depcomp       install-sh         missing   vsprojects
ChangeLog  Makefile.in  README_windows.txt  build       configure     doc           ltmain.sh          packages
[root@A01-R04-I221-18 gflags-1.7]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking host system type... (cached) x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking for sys/stat.h... (cached) yes
checking for unistd.h... (cached) yes
checking for uint16_t... yes
checking for u_int16_t... yes
checking for __int16... no
checking for strtoll... yes
checking for strtoq... yes
checking for __attribute__... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking whether to check for GCC pthread/shared inconsistencies... yes
checking whether -pthread is sufficient with -shared... yes
checking whether what we have so far is sufficient with -nostdlib... no
checking whether -lpthread saves the day... yes
checking whether the compiler implements namespaces... yes
checking what namespace STL code is in... std
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/gflags/gflags.h
config.status: creating src/gflags/gflags_declare.h
config.status: creating src/gflags/gflags_completions.h
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[root@A01-R04-I221-18 gflags-1.7]# ls
AUTHORS    Makefile     README              build          config.sub    doc                ltmain.sh  src
COPYING    Makefile.am  README_windows.txt  config.guess   configure     google-gflags.sln  m4         vsprojects
ChangeLog  Makefile.in  aclocal.m4          config.log     configure.ac  install-sh         missing
INSTALL    NEWS         autogen.sh          config.status  depcomp       libtool            packages
[root@A01-R04-I221-18 gflags-1.7]# cd build
[root@A01-R04-I221-18 build]# cmake ..
CMake Error: The source directory "/home/xxs/xxs/gflags-1.7" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[root@A01-R04-I221-18 build]# make
make: *** No targets specified and no makefile found.  Stop.
[root@A01-R04-I221-18 build]# cd ..
[root@A01-R04-I221-18 gflags-1.7]# make
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags.lo -MD -MP -MF .deps/libgflags_la-gflags.Tpo -c -o libgflags_la-gflags.lo `test -f 'src/gflags.cc' || echo './'`src/gflags.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags.lo -MD -MP -MF .deps/libgflags_la-gflags.Tpo -c src/gflags.cc  -fPIC -DPIC -o .libs/libgflags_la-gflags.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags.lo -MD -MP -MF .deps/libgflags_la-gflags.Tpo -c src/gflags.cc -o libgflags_la-gflags.o >/dev/null 2>&1
mv -f .deps/libgflags_la-gflags.Tpo .deps/libgflags_la-gflags.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_la-gflags_reporting.Tpo -c -o libgflags_la-gflags_reporting.lo `test -f 'src/gflags_reporting.cc' || echo './'`src/gflags_reporting.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_la-gflags_reporting.Tpo -c src/gflags_reporting.cc  -fPIC -DPIC -o .libs/libgflags_la-gflags_reporting.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_la-gflags_reporting.Tpo -c src/gflags_reporting.cc -o libgflags_la-gflags_reporting.o >/dev/null 2>&1
mv -f .deps/libgflags_la-gflags_reporting.Tpo .deps/libgflags_la-gflags_reporting.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_la-gflags_completions.Tpo -c -o libgflags_la-gflags_completions.lo `test -f 'src/gflags_completions.cc' || echo './'`src/gflags_completions.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_la-gflags_completions.Tpo -c src/gflags_completions.cc  -fPIC -DPIC -o .libs/libgflags_la-gflags_completions.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -pthread -DNDEBUG -g -O2 -MT libgflags_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_la-gflags_completions.Tpo -c src/gflags_completions.cc -o libgflags_la-gflags_completions.o >/dev/null 2>&1
mv -f .deps/libgflags_la-gflags_completions.Tpo .deps/libgflags_la-gflags_completions.Plo
/bin/sh ./libtool --tag=CXX   --mode=link g++ -pthread -DNDEBUG -g -O2 -pthread -version-info 3:0:1  -o libgflags.la -rpath /usr/local/lib  libgflags_la-gflags.lo libgflags_la-gflags_reporting.lo libgflags_la-gflags_completions.lo -lpthread 
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o  .libs/libgflags_la-gflags.o .libs/libgflags_la-gflags_reporting.o .libs/libgflags_la-gflags_completions.o   -lpthread -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o  -pthread -pthread   -pthread -Wl,-soname -Wl,libgflags.so.2 -o .libs/libgflags.so.2.1.0
libtool: link: (cd ".libs" && rm -f "libgflags.so.2" && ln -s "libgflags.so.2.1.0" "libgflags.so.2")
libtool: link: (cd ".libs" && rm -f "libgflags.so" && ln -s "libgflags.so.2.1.0" "libgflags.so")
libtool: link: ar cru .libs/libgflags.a  libgflags_la-gflags.o libgflags_la-gflags_reporting.o libgflags_la-gflags_completions.o
libtool: link: ranlib .libs/libgflags.a
libtool: link: ( cd ".libs" && rm -f "libgflags.la" && ln -s "../libgflags.la" "libgflags.la" )
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags.Tpo -c -o libgflags_nothreads_la-gflags.lo `test -f 'src/gflags.cc' || echo './'`src/gflags.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags.Tpo -c src/gflags.cc  -fPIC -DPIC -o .libs/libgflags_nothreads_la-gflags.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags.Tpo -c src/gflags.cc -o libgflags_nothreads_la-gflags.o >/dev/null 2>&1
mv -f .deps/libgflags_nothreads_la-gflags.Tpo .deps/libgflags_nothreads_la-gflags.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_reporting.Tpo -c -o libgflags_nothreads_la-gflags_reporting.lo `test -f 'src/gflags_reporting.cc' || echo './'`src/gflags_reporting.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_reporting.Tpo -c src/gflags_reporting.cc  -fPIC -DPIC -o .libs/libgflags_nothreads_la-gflags_reporting.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_reporting.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_reporting.Tpo -c src/gflags_reporting.cc -o libgflags_nothreads_la-gflags_reporting.o >/dev/null 2>&1
mv -f .deps/libgflags_nothreads_la-gflags_reporting.Tpo .deps/libgflags_nothreads_la-gflags_reporting.Plo
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_completions.Tpo -c -o libgflags_nothreads_la-gflags_completions.lo `test -f 'src/gflags_completions.cc' || echo './'`src/gflags_completions.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_completions.Tpo -c src/gflags_completions.cc  -fPIC -DPIC -o .libs/libgflags_nothreads_la-gflags_completions.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -DNDEBUG -DNO_THREADS -g -O2 -MT libgflags_nothreads_la-gflags_completions.lo -MD -MP -MF .deps/libgflags_nothreads_la-gflags_completions.Tpo -c src/gflags_completions.cc -o libgflags_nothreads_la-gflags_completions.o >/dev/null 2>&1
mv -f .deps/libgflags_nothreads_la-gflags_completions.Tpo .deps/libgflags_nothreads_la-gflags_completions.Plo
/bin/sh ./libtool --tag=CXX   --mode=link g++ -DNDEBUG -DNO_THREADS -g -O2 -version-info 3:0:1  -o libgflags_nothreads.la -rpath /usr/local/lib  libgflags_nothreads_la-gflags.lo libgflags_nothreads_la-gflags_reporting.lo libgflags_nothreads_la-gflags_completions.lo  
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o  .libs/libgflags_nothreads_la-gflags.o .libs/libgflags_nothreads_la-gflags_reporting.o .libs/libgflags_nothreads_la-gflags_completions.o   -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o    -Wl,-soname -Wl,libgflags_nothreads.so.2 -o .libs/libgflags_nothreads.so.2.1.0
libtool: link: (cd ".libs" && rm -f "libgflags_nothreads.so.2" && ln -s "libgflags_nothreads.so.2.1.0" "libgflags_nothreads.so.2")
libtool: link: (cd ".libs" && rm -f "libgflags_nothreads.so" && ln -s "libgflags_nothreads.so.2.1.0" "libgflags_nothreads.so")
libtool: link: ar cru .libs/libgflags_nothreads.a  libgflags_nothreads_la-gflags.o libgflags_nothreads_la-gflags_reporting.o libgflags_nothreads_la-gflags_completions.o
libtool: link: ranlib .libs/libgflags_nothreads.a
libtool: link: ( cd ".libs" && rm -f "libgflags_nothreads.la" && ln -s "../libgflags_nothreads.la" "libgflags_nothreads.la" )
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -g -O2 -MT gflags_unittest-gflags_unittest.o -MD -MP -MF .deps/gflags_unittest-gflags_unittest.Tpo -c -o gflags_unittest-gflags_unittest.o `test -f 'src/gflags_unittest.cc' || echo './'`src/gflags_unittest.cc
mv -f .deps/gflags_unittest-gflags_unittest.Tpo .deps/gflags_unittest-gflags_unittest.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -pthread -g -O2 -pthread  -o gflags_unittest  gflags_unittest-gflags_unittest.o libgflags.la 
libtool: link: g++ -pthread -g -O2 -pthread -o .libs/gflags_unittest gflags_unittest-gflags_unittest.o  ./.libs/libgflags.so -pthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -MT gflags_unittest.o -MD -MP -MF .deps/gflags_unittest.Tpo -c -o gflags_unittest.o `test -f 'src/gflags_unittest.cc' || echo './'`src/gflags_unittest.cc
mv -f .deps/gflags_unittest.Tpo .deps/gflags_unittest.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined   -o gflags_nothreads_unittest  gflags_unittest.o libgflags_nothreads.la 
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -o .libs/gflags_nothreads_unittest gflags_unittest.o  ./.libs/libgflags_nothreads.so
rm -f src/gflags_unittest-main.cc
cp -p ./src/gflags_unittest.cc src/gflags_unittest-main.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -MT gflags_unittest-main.o -MD -MP -MF .deps/gflags_unittest-main.Tpo -c -o gflags_unittest-main.o `test -f 'src/gflags_unittest-main.cc' || echo './'`src/gflags_unittest-main.cc
mv -f .deps/gflags_unittest-main.Tpo .deps/gflags_unittest-main.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined   -o gflags_unittest2  gflags_unittest-main.o libgflags_nothreads.la 
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -o .libs/gflags_unittest2 gflags_unittest-main.o  ./.libs/libgflags_nothreads.so
rm -f src/gflags_unittest_main.cc
cp -p ./src/gflags_unittest.cc src/gflags_unittest_main.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -MT gflags_unittest_main.o -MD -MP -MF .deps/gflags_unittest_main.Tpo -c -o gflags_unittest_main.o `test -f 'src/gflags_unittest_main.cc' || echo './'`src/gflags_unittest_main.cc
mv -f .deps/gflags_unittest_main.Tpo .deps/gflags_unittest_main.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined   -o gflags_unittest3  gflags_unittest_main.o libgflags_nothreads.la 
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -o .libs/gflags_unittest3 gflags_unittest_main.o  ./.libs/libgflags_nothreads.so
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -pthread -g -O2 -MT gflags_strip_flags_test-gflags_strip_flags_test.o -MD -MP -MF .deps/gflags_strip_flags_test-gflags_strip_flags_test.Tpo -c -o gflags_strip_flags_test-gflags_strip_flags_test.o `test -f 'src/gflags_strip_flags_test.cc' || echo './'`src/gflags_strip_flags_test.cc
mv -f .deps/gflags_strip_flags_test-gflags_strip_flags_test.Tpo .deps/gflags_strip_flags_test-gflags_strip_flags_test.Po
/bin/sh ./libtool --tag=CXX   --mode=link g++ -pthread -g -O2 -pthread  -o gflags_strip_flags_test  gflags_strip_flags_test-gflags_strip_flags_test.o libgflags.la 
libtool: link: g++ -pthread -g -O2 -pthread -o .libs/gflags_strip_flags_test gflags_strip_flags_test-gflags_strip_flags_test.o  ./.libs/libgflags.so -pthread
echo 'prefix=/usr/local' > "libgflags.pc".tmp
echo 'exec_prefix='`echo '/usr/local' | sed 's@^/usr/local@${prefix}@'` >> "libgflags.pc".tmp
echo 'libdir='`echo '/usr/local/lib' | sed 's@^/usr/local@${exec_prefix}@'` >> "libgflags.pc".tmp
echo 'includedir='`echo '/usr/local/include' | sed 's@^/usr/local@${prefix}@'` >> "libgflags.pc".tmp
echo '' >> "libgflags.pc".tmp
echo 'Name: gflags' >> "libgflags.pc".tmp
echo 'Version: 1.7' >> "libgflags.pc".tmp
grep '^Summary:' ./packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "libgflags.pc".tmp
grep '^URL: ' ./packages/rpm/rpm.spec >> "libgflags.pc".tmp
echo 'Requires:' >> "libgflags.pc".tmp
echo 'Libs: -L${libdir} -lgflags' >> "libgflags.pc".tmp
echo 'Libs.private: -pthread -lpthread' >> "libgflags.pc".tmp
echo 'Cflags: -I${includedir}' >> "libgflags.pc".tmp
mv -f "libgflags.pc".tmp "libgflags.pc"
grep -v Libs.private libgflags.pc | sed s/-lgflags/-lgflags_nothreads/ > "libgflags_nothreads.pc"
[root@A01-R04-I221-18 gflags-1.7]# make install
make[1]: Entering directory `/home/xxs/xxs/gflags-1.7'
test -z "/usr/local/bin" || /usr/bin/mkdir -p "/usr/local/bin"
 /usr/bin/install -c 'src/gflags_completions.sh' '/usr/local/bin/gflags_completions.sh'
test -z "/usr/local/lib" || /usr/bin/mkdir -p "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'libgflags.la' '/usr/local/lib/libgflags.la'
libtool: install: /usr/bin/install -c .libs/libgflags.so.2.1.0 /usr/local/lib/libgflags.so.2.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags.so.2.1.0 libgflags.so.2 || { rm -f libgflags.so.2 && ln -s libgflags.so.2.1.0 libgflags.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags.so.2.1.0 libgflags.so || { rm -f libgflags.so && ln -s libgflags.so.2.1.0 libgflags.so; }; })
libtool: install: /usr/bin/install -c .libs/libgflags.lai /usr/local/lib/libgflags.la
libtool: install: /usr/bin/install -c .libs/libgflags.a /usr/local/lib/libgflags.a
libtool: install: chmod 644 /usr/local/lib/libgflags.a
libtool: install: ranlib /usr/local/lib/libgflags.a
libtool: finish: PATH="/home/xxs/anaconda2/bin:/usr/bin/python2:bin/export/servers/jdk1.6.0_25/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'libgflags_nothreads.la' '/usr/local/lib/libgflags_nothreads.la'
libtool: install: /usr/bin/install -c .libs/libgflags_nothreads.so.2.1.0 /usr/local/lib/libgflags_nothreads.so.2.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags_nothreads.so.2.1.0 libgflags_nothreads.so.2 || { rm -f libgflags_nothreads.so.2 && ln -s libgflags_nothreads.so.2.1.0 libgflags_nothreads.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgflags_nothreads.so.2.1.0 libgflags_nothreads.so || { rm -f libgflags_nothreads.so && ln -s libgflags_nothreads.so.2.1.0 libgflags_nothreads.so; }; })
libtool: install: /usr/bin/install -c .libs/libgflags_nothreads.lai /usr/local/lib/libgflags_nothreads.la
libtool: install: /usr/bin/install -c .libs/libgflags_nothreads.a /usr/local/lib/libgflags_nothreads.a
libtool: install: chmod 644 /usr/local/lib/libgflags_nothreads.a
libtool: install: ranlib /usr/local/lib/libgflags_nothreads.a
libtool: finish: PATH="/home/xxs/anaconda2/bin:/usr/bin/python2:bin/export/servers/jdk1.6.0_25/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/share/doc/gflags-1.7" || /usr/bin/mkdir -p "/usr/local/share/doc/gflags-1.7"
 /usr/bin/install -c -m 644 'AUTHORS' '/usr/local/share/doc/gflags-1.7/AUTHORS'
 /usr/bin/install -c -m 644 'COPYING' '/usr/local/share/doc/gflags-1.7/COPYING'
 /usr/bin/install -c -m 644 'ChangeLog' '/usr/local/share/doc/gflags-1.7/ChangeLog'
 /usr/bin/install -c -m 644 'INSTALL' '/usr/local/share/doc/gflags-1.7/INSTALL'
 /usr/bin/install -c -m 644 'NEWS' '/usr/local/share/doc/gflags-1.7/NEWS'
 /usr/bin/install -c -m 644 'README' '/usr/local/share/doc/gflags-1.7/README'
 /usr/bin/install -c -m 644 'README_windows.txt' '/usr/local/share/doc/gflags-1.7/README_windows.txt'
 /usr/bin/install -c -m 644 'doc/designstyle.css' '/usr/local/share/doc/gflags-1.7/designstyle.css'
 /usr/bin/install -c -m 644 'doc/gflags.html' '/usr/local/share/doc/gflags-1.7/gflags.html'
test -z "/usr/local/include/gflags" || /usr/bin/mkdir -p "/usr/local/include/gflags"
 /usr/bin/install -c -m 644 'src/gflags/gflags.h' '/usr/local/include/gflags/gflags.h'
 /usr/bin/install -c -m 644 'src/gflags/gflags_declare.h' '/usr/local/include/gflags/gflags_declare.h'
 /usr/bin/install -c -m 644 'src/gflags/gflags_completions.h' '/usr/local/include/gflags/gflags_completions.h'
test -z "/usr/local/include/google" || /usr/bin/mkdir -p "/usr/local/include/google"
 /usr/bin/install -c -m 644 'src/google/gflags.h' '/usr/local/include/google/gflags.h'
 /usr/bin/install -c -m 644 'src/google/gflags_completions.h' '/usr/local/include/google/gflags_completions.h'
test -z "/usr/local/lib/pkgconfig" || /usr/bin/mkdir -p "/usr/local/lib/pkgconfig"
 /usr/bin/install -c -m 644 'libgflags.pc' '/usr/local/lib/pkgconfig/libgflags.pc'
 /usr/bin/install -c -m 644 'libgflags_nothreads.pc' '/usr/local/lib/pkgconfig/libgflags_nothreads.pc'
make[1]: Leaving directory `/home/xxs/xxs/gflags-1.7'
[root@A01-R04-I221-18 gflags-1.7]# 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值